Search This Blog

Thursday, September 4, 2014

Virtual machines - UUID or InstanceUUID

Historically, Unique ID's or serial numbers have been a challenge within VMware. The lack of Uniqueness limited the number of objects vCenter could manage and the inability to uniquely identify Virtual Machine utilization for asset control.

In the early days of version 3 Virtual Center, VMware virtual machines were unique identified by a managed object reference ID (called a MoREF). MoREF's were were limited to 99 instances and duplicates easily occured. vCenter 4.* came along and several changes were introduced. The Virtual Machine object history of unique identification was as follows

Virtual Center 3- MoREF's were expanded to 999, but that didn't sufficiently reduce duplicates or allow for more than 999 vm's per vCenter.

Virtual Center 4. * UuID was introduced. When a VM is created, ESXi creates the 128-bit integer Uuid such as: 421b4187-bcb4-3dc1-e7d7-c9496d3fdca9 The UUID was how vCenter 4.* tracked a Virtual Machines. This failed however, because duplicates occur during VM copy or cloning.

vCenter 4.1 (if I recall correctly) the PersistentID was introduced as a more Persistent identifier.

vCenter 5.* - PersistentID was changed to InstanceUuid. Therefore, the InstanceUuID is, as of vCenter and ESXi version 5.0, 5.1, and 5.5 is unique. Duplicates for UUID and MOREF may still occur due to replication, copy, or cloning processes.

The InstanceUuid, formerly known as PersistentID before it was deprecated, is best known method for unique identification of a virtual machine within a vCenter or a collection of vCenters.

The InstanceUuid is not visible through the vCenter Client, but it is visible through the vCenter API (SDK) or through PowerCLI.

Example

If connected to a vCenter or ESXi host through PowerCLI, here's a code snippet to view both the UuID and the PersistentID: