Regenerate a Unique UUID for an Existing Virtual Machine
search cancel

Regenerate a Unique UUID for an Existing Virtual Machine

book

Article ID: 426057

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

In vCenter Server, multiple virtual machines have the same UUID after being deployed from the same VM template.

Resolution

  1. Power off the virtual machine from the vCenter UI.

  2. Take an SSH/Putty session to the ESXi host where the VM resides.

  3. Identify the VM ID by running the following command:
    • vim-cmd vmsvc/getallvms | grep <VM_NAME>
  4. Navigate to the datastore directory containing the virtual machine configuration file and create a backup of the .vmx file:

    • cd /vmfs/volumes/<DATASTORE_NAME>/<VM_NAME>/

    • mkdir tmp

    • cp <VM_NAME>.vmx tmp/<VM_NAME>.vmx.bak

  5. Verify the existing UUID values before making any changes:

    • grep -i uuid <VM_NAME>.vmx

  6. Edit the .vmx file and remove the line with UUID-related entries (for example, uuid.bios, uuid.location, vc.uuid):

    • vi <VM_NAME>.vmx

  7. Save the file and reload the virtual machine configuration using the following command:

    • vim-cmd vmsvc/reload <VMID>

    • Note: (Use the VMID obtained in Step 3.)

  8. Power on the VM from the vCenter UI.