I have looked a fair bit for a way to make a correlation, and have come up with nothing, so far.
But, to be sure about what you are looking for: you want to know what SCSI ID (like, SCSI 0:0 or SCSI 0:1) corresponds with what volume/partition within the guest? Or, you are trying to figure out which volume is in which VMDK file? (or both?)
And, are there any assumptions/facts in place here, like:
0) are the guests are only one OS family or another (Windows, or Linux, or..), or are they mixed?
1) is there possibly more than one (1) volume/partition on a SCSI device or VMDK?
Just trying to think of things that might help us get to the solution...
In our PowerCLI book we provide a function, called Get-VMDiskMapping, that will do this mapping.
The function uses the Invoke-VMScript cmdlet to launch a VBS script inside the guest OS to get the partition info through WMI.
So no external WMI calls !
Of course we prefer you get the book, but we made the functions from the book publically available.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
Sorry for the late answer - my mail has been down do to flodding.
Yes, I'm trying to match a volume/partition with a SCSI id so I can automate the extention process.
Yes, I also need to pair a volume/partition to a VMDK file.
- For the time beeing only Windows.
- Yes, there can be multible volume/partitions in a VMDK
- I'm trying to do all without the need for host and guest credentials
I have got it to work with credentials - still missing driveletter.
Just boughtthe book - still waiting for delevery
You can already download the function, there is help available inline.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz