I need to be able to identify which cluster or vCenter instance some ESX servers are part of, but need to get this information directly from the ESX server itself. Is this information available in the vSphere API on the host system?
Background: I want to assign a unique identifier to each VM in a large estate managed by multiple vCenters, but VMware do no understand what the UU in UUID stands for - their 'universally unique' identifier can be duplicated when you copy a VM. The instanceUuid attribute is better, but only unique in the scope of the managing vCenter instance. To create a unique identity I need the ID of the vCenter as well as the ESX or VM ID.
Also does anyone know what happens to the instanceUuid if an ESX host is not managed by vCenter - is it still set? What happens if a stand-alone ESX is added to vCenter - does it change the instanceUuid of the host and all the guests? The official docs are silent on this matter. Can the instanceUuid be relied on as a stable identity?