Error: "Virtual disks with same UUID should not be assigned to a VM" when adding a disk to a virtual machine
search cancel

Error: "Virtual disks with same UUID should not be assigned to a VM" when adding a disk to a virtual machine

book

Article ID: 341653

calendar_today

Updated On: 04-04-2025

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • If the virtual machine is running and changes are made to the virtual machine settings, there may be a message similar to:
[msg.disk.duplicateUUID] Virtual disks "/vmfs/volumes/<DatastoreName>/<VMName>/<vDiskName.vmdk>" and "/vmfs/volumes/<DatastoreName>/<VMName>/<vDiskName.vmdk>" have the same UUID 12 34 A5 67 89 B0 1C 23-DE 45 6F 78 9A B0 1C 23. Virtual disks with same UUID should not be assigned to a VM since this can lead to problems when the guest boots. Please make sure virtual disks have unique UUIDs. Do you want to continue?
Note: The complete message is visible in the vmware.log file of the virtual machine.
  • If the virtual machine is running and answered no, the virtual disk is not added to the virtual machine and the virtual disk will be locked.

Environment

VMware vSphere ESXi 8.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 6.x

Cause

It is not possible to add a disk to a virtual machine that currently has a disk with the same UUID (Universally Unique Identifier).

Resolution

To create a new UUID for the disk:

       1. Power off the virtual machine to unlock the disk.

       2. To get the virtual disk UUID, run the following command:
       $ vmkfstools -J getuuid <vmname>.vmdk

       Example:
   $ vmkfstools -J getuuid /vmfs/volumes/datastore/VM/vm.vmdk

   UUID is 12 34 A5 67 89 B0 1C 23-DE 45 6F 78 9A B0 1C 23

       3. To set or modify the UUID, run this command:
   $ vmkfstools -J setuuid  <vmname>.vmdk

       Example:
   $ vmkfstools -J setuuid  /vmfs/volumes/datastore/VM/vm.vmdk
   UUID is 12 34 A5 67 89 B0 1C 23-DE 45 6F 78 9A B0 1C 23

       A new UUID is returned after the command executes.

  • Alternatively when cloning a vmdk, a new disk will generally have a different UUID.

Additional Information