VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

Editing a Virtual Machine with a Duplicate UUID.bios

Details

When I convert a virtual machine using VMware converter or when  I clone a virtual machine (not a template), the new virtual machine does not have a unique UUID.bios . How can I programmatically change the UUID.bios ?
 
Possible error:
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

Solution

You cannot run virtual machines with the same UUID. When you clone or convert virtual machines, sometimes they end up with the same UUID. When this happens you must change the UUIDs so each virtual machine’s UUID is unique.

You can change the UUIDs:

  • Programmatically (recommended)
  • Manually (not recommended)

To change the UUIDs programmatically you need the following items on the Windows host machine for the virtual machine:

Programmatically Changing the UUID of a Virtual Machine

  1. Install VI Perl Toolkit.
  2. Power off the virtual machine.

  1. Download the script, UUIDScript.pl, attached to this KB 1002403, to the VI Perl directory: /samples/vm.
    • The Perl Toolkit installer creates a directory: /samples/vm
    • Put the UUIDScript.pl script into the VI Perl Toolkit /samples/vm directory.

  1. Launch a Windows Console session.

 

  1. Windows Start menu > Run.

 

  1. Enter cmd.exe in the dialog.

A command prompt window is displayed.

 

  1. Launch the UUID script.

From the command prompt:

o        Change to the \viperltoolkit\Perl\samples\vm directory.

o        Run the command:

C:\viperltoolkit\Perl\samples\vm > perl UUIDScript.pl --url https://%3chost%3e:%3cport%3e/sdk/vimService --username <myuser> --password <mypassword> --vmname <VirtualMachineName> --uuid <UUID>

 

where –

<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

Note: This method is available, but it is not recommended. If it's possible, use the UUIDScript.pl to change duplicated UUID numbers.

1. Power off the virtual machine whose UUID you are going to change.

2. Edit the virtual machine’s configuration file (.vmx ). Use a text editor of your choice.

3. Search the file for the line:

uuid.bios = <uuidvalue>

4. Using the following format, enter the new UUID. 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 separated by spaces, except for a dash between the eighth and ninth hexadecimal pairs. The UUID is based on the physical computer's identifier and the path to the virtual machine's configuration file.

5. Save and close the configuration file.

6. Power on the virtual machine.

The new UUID is used when the virtual machine boots.

Keywords

SDK, UUID, URLZ

Attachments

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (1 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (1 Ratings)   
Actions