Editing a virtual machine with a duplicate UUID.bios (1002403)
- When you convert a virtual machine using VMware converter or when you clone a virtual machine (not a template), the new virtual machine does not have a unique UUID.bios .
- You may see an error similar to:
msg:disk.duplicateUUID:Virtual disk. Virtual Disks with same UUID should not be assigned to a VM since this can lead problems when the guest boots. Please make sure virtual disks have unique UUIDs
You can change the UUIDs:
Manually (not recommended)
To change the UUIDs programmatically you need the following items on the Windows host machine for the virtual machine:
- The script attached to this article
- VI Perl Toolkit
Note: For more information, see www.vmware.com/support/developer/viperltoolkit.
Programmatically changing the UUID of a virtual machine
Install VI Perl Toolkit.
- Power off the virtual machine.
- Download the script, UUIDScript.pl, attached to this article, to the VI Perl directory /samples/vm.
The Perl Toolkit installer creates the directory /samples/vm. Put the UUIDScript.pl script into the VI Perl Toolkit /samples/vm directory.
- Launch a Windows Console session.
- From Windows, click Start > Run, type cmd.exe, and click OK.
- Launch the UUID script.
From the command prompt:
o Change to the \viperltoolkit\Perl\samples\vm directory.
C:\viperltoolkit\Perl\samples\vm > perl UUIDScript.pl --url https://%3chost%3e:%3cport%3e/sdk/vimService --username <myuser> --password <mypassword> --vmname <VirtualMachineName> --uuid <UUID>
<host> is the name of the server where the virtual machine resides.
<port> is an access port on the server where the virtual machine resides.
<myuser> is your administrator privilege level user name.
<mypassword> is your corresponding user name’s password.
<VirtualMachineName> is the name of the virtual machine whose UUID you are changing.
<UUID> is the new UUID value for the virtual machine.
Manually changing the UUID of a virtual machine
- Power off the virtual machine whose UUID you are going to change.
- Edit the virtual machine’s configuration file (.vmx ). Use a text editor of your choice.
- Search the file for the line:
uuid.bios = <uuidvalue>
- Enter the new UUID in this format. Include the quotation marks.
uuid.bios = "00 11 22 33 44 55 66 77-88 99 aa bb cc dd ee ff"
The UUID is a 128-bit integer. The 16 bytes of this value are created by using 16 hexadecimal digit pairs. Each digit in the pair can have any value between 0 to f (the digits of the hexadecimal number system), for example 1e, 87 or d3. These pairs are separated by spaces, except for a dash between the eighth and ninth hexadecimal pairs. The UUID is generally based on the physical computer's identifier and the path to the virtual machine's configuration file.
- Save and close the configuration file.
- Power on the virtual machine.
The new UUID is used when the virtual machine boots.