to clarify: I want to monitor the free space on the guest drive, then increase the corresponding vm disk when the free space is down to say 5%. Am working now just to be able to connect the 2 disparate disk objects(vm harddisk, and guest disk).
I'm not sure if you searched in this community for similar questions, but this a kind of Holy Grail.
And not to raise your expectations, there is no fool-proof way of doing that.
There are some solutions which work in very specific conditions.
For example, a specific guest OS, only 1 guest OS partition per VMDK, using VMDK of different sizes...
But there is, for the moment, no solution that works in all circumstances.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
i did search.... hence the starting point, and I think you might have been involved in that discussion too. The machines I want to do this with all meet some criteria or another... Typically one partition for VMDK for instance. However they oftern have 2 disks of the same size ... making a compare very harrd(if not impossible) to do.
The type of Guest OS also plays a role.
A Windows-based OS (not all versions) might be a bit simpler in some cases.
But there are many factors that can play a role (MBR or GPT, simple/striped/spanned/mirrored/RAID-5 volume, system/recovery/data partition or free space, encrypted...)
If you have a 1 partition/1 VMDK partition layout you might try with the PCI slot number.
But the allocation mechanism on the VMware side is still a mystery to me.
So if VMDK have been removed/added to a VM, that trick most probably will not work.
On the Linux side the use of an LVM is most of the time masking all links between a guest OS filesystem and a VMDK.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz