Change Instance UUID for VM in ESXi

uuidvmware-esxi

Background

I'm running ESXi 6.0.0 in free mode. I created one VM and then copied its files to another folder in the datastore to create the next machine (almost like a template). I wound up with two working VM's that have been doing just fine in production.

Problem

My backup drives finally came in, so now I'm trying to set up Unitrends to do VM level backups. When I try to connect Unitrends to ESXi, it gives an error:

Virtual machines "vm1name" and "vm2name" have the same Instance UUID. Please use the VMware vSphere Client or another administration tool to assign a new UUID to one of the virtual machines.

According to the advice on this forum post: I tried to edit the VMX file to change the bios.uuid value. That didn't resolve the error. Next I tried to use the script form the same post in PowerCLI. It showed me that I do indeed have duplicate instance UUID's. These are apparently different from the UUID values in the vmx file (which are unique). I have two machines that both have the instance UUID of

52c7dbf3-e442-da43-a0b1-2a9befd93919

Unforrunately, it seems that I can't find a way to change the instance UUID. I haven't been able to find anything about it online.

Question

How do I change the Instance UUID for a virtual machine on ESXi? I really must get it working, and I'd appreciate any help you can provide. Thank you!

Best Answer

The most clean and troublefree solution would be to create a new machine and attach the disks.


However, if you want to edit the configuration, there are three UUIDs in a machine's settings.

  • You can delete uuid.location and uuid.bios from .vmx configuration file, for example with the following commands:

    sed -i '/uuid.location/d' ./*.vmx
    sed -i '//d' ./*.vmx
    

    and restart the machine -- it should force the generation of new UUIDs (the last three digits of uuid.bios will also match the part of MAC address in ethernet0.generatedAddress).

  • The third one vc.uuid (most likely the one that Unitrends complains about) does not get recreated, but you can change its value to another deliberate random number. In your case the line in the .vmx should be:

    vc.uuid = "52 c7 db f3 e4 42 da 43-a0 b1 2a 9b ef d9 39 19"
    

You need to perform the changes to the .vmx file while the machine is stopped, otherwise they will get overwritten.