This procedure calls VixDiskLib_GetInfo() for information about the virtual disk, displays results, and calls VixDiskLib_FreeInfo() to reclaim memory. The parameter disk.Handle() comes from the VixDisk wrapper class discussed in Wrapper Classes.

In this example, the sample program connects to an ESXi host named esx5 and displays virtual disk information for a Red Hat Enterprise Linux client. For an ESXi host, path to disk is often something like [datastore1] followed by the virtual machine name and the VMDK filename.

vix-diskLib-sample -info -host esx5 -user root -password secret "[datastore1] RHEL6/RHEL6.vmdk"

vix-diskLib-sample -info -host esx5 -user root -password secret "[datastore1] RHEL6/RHEL6.vmdk"
Disk "[datastore1] RHEL6/RHEL6.vmdk" is open using transport mode "nbdssl".
capacity          = 4194304 sectors
number of links   = 1
adapter type      = LsiLogic SCSI
BIOS geometry     = 0/0/0
physical geometry = 261/255/63
Transport modes supported by vixDiskLib: file:nbdssl

If you multiply physical geometry numbers (261 cylinders * 255 heads per cylinder * 63 sectors per head) the result is a capacity of 4192965 sectors, although the first line says 4194304. A small discrepancy is possible due to rounding. In general, you get at least the capacity that you requested. The number of links specifies the separation of a child from its original parent in the disk chain (redo logs), starting at one. The parent has one link, its child has two links, the grandchild has three links, and so forth.