sharninder
Enthusiast
Enthusiast

The SCSI bus information is not very reliable IMHO. Depending on the guest operating system, a disk attached to, say, 1:2 scsi node on the virtual machine may actually end up on 1:3 or 1:1 or anywhere else actually. We found this out the hard way while automating a bunch of test cases while I was at VMware. The only reliable way of figuring out the real disks that I can recommend is by looking at the UUID of the VMDK files themselves. You can open the disk descriptor while to look at the UUID or use the vmkfstools command with the -J (I think) option to fetch the UUID and then inside the guest do the same for all disks.

This may (or may not) be possible directly using the vsphere APIs. Have a look at the VirtualDiskManager/VirtualDisk objects to see if you can get the UUID of a disk from there. The guest side tasks can be done using the VIX APIs.

Reply
0 Kudos