Hi,
I have created one virtual disk and have Added it to the guest OS thru VIrtual Infrastructure CLient and it is made visible as
.\PHYSICALDRIVE1. I have a application running on the guest OS which wants to Query
.\PHSYICALDRIVE1 and wants to know what datastore it belongs to. The application uses VI SDK. Is it possible?
-Sunil
Hi!
Assuming that VMware tools are installed, AFAIK there is no direct relation between virtualDisk (config.hardware.device) and guest.disk.
From guest.disk you can get the name of the partition. Assuming that you have on partition per disk, it should be possible to find the right vmdk file and so the datastore.
Having more than one partition on one virtual disk makes it impossible with the VI SDK (only) to detect vmdk files or/and datastores for a given partition.
See also: http://communities.vmware.com/thread/113805
Tos2k
Hi,
You have said that if there is only one partition in a disk, it should be possilble to find the right VMDK file. Could you please explain me how to do that ?
Thanks in Advance,
Mani
Hi!
The vmdk file name can be fetched from VM->layout->disk, the partition name have to be fetched from VM->guest->disk
Tos2k
Hi,
I was able to get that info. But how could i know which disk corresponds to which partition ? How can i map ?
Thanks in Advance,
Mani
I dunno! The key I recommended a few times is missing (guestinfo.virtualmachinefileinfodisk)
but maybe there is a 1:1 relation?
But no doubt, I dont know, and the design is crap here, sorry to say. I really would like to get a reply on my feature request:
Tos2k