While catching up on some email this morning, I received an interesting question from an internal engineer regarding the behavior when a duplicate instanceUUID is encountered on an ESXi host. An instanceUUID is a unique identifier that is used by vCenter Server to uniquely identify a Virtual Machine within a vCenter Server instance, I have written extensively about this topic here and here. The question that was brought up was what happens when a duplicate instanceUUID is encountered on a standalone/un-managed ESXi host and then it is added to vCenter Server?
I had theory on how this might work, but I figured I might as well try this out in the lab to be sure. I created two standalone ESXi hosts and created a Virtual Machine on each host and made sure that both had the same instanceUUID (yes, the ESXi host will actually generate the instanceUUID property regardless of being connected to a vCenter Server, I suspect this is mainly for a placeholder). I then add ESXi #1 to a vCenter Server and confirmed that the instanceUUID is still the same using the vSphere MOB. I then continue to add ESXi #2 to the vCenter Server and because a duplicate instanceUUID has been detected, vCenter Server automatically updates the second Virtual Machine with a new instanceUUID.
Before adding to vCenter Server:
- ESXi-1
- VM1 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e
- ESXI-2
- VM2 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e
After adding to vCenter Server:
- ESXi-1
- VM1 - InstanceUUID: 52b5e420-9d79-6095-cfdf-dfdd998d205e
- ESXI-2
- VM2 - InstanceUUID: 502db26b-c32d-6c32-cd6c-1ffc1549d269
An interesting observation that was made by the engineer while testing a similar scenario was that instead of having two ESXi hosts, he just had one. He was a bit surprised to see that the ESXi host actually allowed both Virtual Machines to be powered on even with a duplicate instanceUUID. The reason I believe this was allowed is that both Virtual Machines still had a unique MoRef Identifier along with unique BIOS UUID and more importantly, the instanceUUID property is ONLY used with vCenter Server. From the ESXi host point of view, it does not care if it has a duplicate instanceUUID as it is not used but will try to generate a unique one to begin. This was actually pretty interesting to know and the reason for the initial question was to ensure that the instanceUUID of a Virtual Machine is still the right property to uniquely identify a Virtual Machine within vCenter Server, which it is.
Sandy says
Hi William,
Thanks for the detailed explanation. However I have a scenario where in I am trying to use a backup software and backup a particular VM. I am not able to add 2 particular VMS. When I contacted the backup product engineers I see that they use the Instance UUId of a VM to identify and locate the VM. In my eg. both VM have no Instace UUID in the MOB. They are empty. Can you help me in how I can generate the Instance UUID. When I manually edited the Mob with Instance UUID , the VM on boot error'd out -- 0 The device refers to a inexistent controller 0.
Please help me in generating an instance UUID..
William Lam says
The instanceUUID is automatically generated by vSphere, this assumes the VM was properly created through vSphere either through the UI or API and not by hand. If that's the case, you shouldn't be having this problem. If you are in fact seeing this, I recommend you file an SR w/VMware GSS to take a look at your setup
jcason says
Hi William,
Wondering what ill effects are to having duplicate UUID (a.k.a. UUID.bios/SMBIOS) for guests in the environment. This VMware KB (https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002403) says that you "cannot run" VMs with duplicate IDs but this isn't true at least in my lab. I also note that local vSphere replication creates duplicate UUID.bios, although to be fair you do have to have one powered down before cutting over. I would assume there are potentially issues with 3rd party tools but am curious about whether a "basic" vsphere cluster would have problems as well.
Thanks for any clarification.
William Lam says
That's correct, you can run VMs w/duplicate SMBIOS but the issue that would arise is for any solutions that may rely on this identifier as a unique entry, especially around licensing which I knew quite a few 3rd party do.
jcason says
Understood, thanks!
Dzmitryj says
Hello William
I got stuck in the situation where I have 2 identical vms with identical UUID as a result of the unsuccessfull cross cluster migration. Currently on of these vms, lets say VM A is powered on on the HOST A in a CLUSTER A DATASTORE A. But I am unable to manage it ( poweron,powerof, migrate) using vcenter. The other vm? lets say VM B has the same name and UUID as VM A, is powered ofF and registered on HOST B in CLUSTER B on DATASTORE B with a Zero size HDD and no vmx file on datastore/ The VM B is Unmanageble from vcenter and has ho .vmx file on datastore and I am unable to unregister it from DataCenter. Would be glad to hear the advice how can I manage the unregister procedure with VM B. Thank you