This procedure calls VixDiskLib_GetMetadataKeys() then VixDiskLib_ReadMetadata() to serve the -meta command-line option. Two read-metadata calls are needed for each key: one to determine length of the value string and another to fill in the value. See Get Metadata Table from Disk.
In the following example, the sample program connects to an ESXi host named esx3 and displays the metadata of the Red Hat Enterprise Linux client’s virtual disk. For an ESXi host, path to disk might be [storage1] followed by the virtual machine name and the VMDK filename.
vix-diskLib-sample -meta -host esx3 -user admin -password secret “[storage1]RHEL5/RHEL5.vmdk" geometry.sectors = 63 geometry.heads = 255 geometry.cylinders = 522 adapterType = buslogic toolsVersion = 1 virtualHWVersion = 7
Tools version and virtual hardware version appear in the metadata, but not in the disk information retrieved by DoInfo(). Geometry information and adapter type are repeated, but in a different format. Other metadata items not listed above might exist.