Is there any way to determine the vSphere virtual machine ID or name or UUID from a linux guest? I have administrative access to the guest, and would like to coordinate some maintenance actions between the guest and vCenter via the vCenter API. To use the vCenter API, I need to identify which VM I'm operating on.
For one-off operations I can find the VM's information from the vCenter GUI or API because I can interpret the VM naming convention, but I'd like to be able to script these operations starting from the guest OS. Basically, given a guest VM: determine the vSphere ID of the VM from the guest, then use that ID to manipulate the VM via the vCenter API.
I read that there is a way to cron a script on each hypervisor host to set guestinfo variables on each running guest which would then be accessible from the guest via open-vm-tools. It might be difficult for me to get admin access to the hypervisor hosts themselves to install such a script, hence my hope that their may be a more generic way.