When trying to add two VirtualBox virtual machines which have been originally copied (via simple file copy) from the same source, on adding the second one I get the message

Failed to open virtual machine [...]
Trying to open a VM config [...] which has the same UUID as an existing virtual machine.

(Yes, the machines should have been cloned instead of simple file copy, but it is too late at this point.)


You can use VBoxManage internalcommands sethduuid <VDI/VMDK file>(Run from the VBox install directory) to change the HD UUID, but this has two shortcomings: it does not update the .vbox file, and it does not change the machine UUID (I did not find any way to do this with VBoxManage), just the HD UUID.

The following worked for me (Win 7, most recent VirtualBox version):

  1. run VBoxManage internalcommands sethduuid <VDI/VMDK file> twice (the first time is just to conveniently generate an UUID, you could use any other UUID generation method instead)
  2. open the .vbox file in a text editor
  3. replace the UUID found in <Machine uuid="{...}" with the UUID you got when you ran sethduuid the first time
  4. replace the UUID found in <HardDisk uuid="{...}" and in <Image uuid="{}" (towards the end) with the UUID you got when you ran sethduuid the second time

You can add the virtual machine after that. Not a very clean solution, but does not seem to cause any problem.

  • 1
    This worked for me, but I also had a DVD "inserted" in the VM that I was manually copying. When I edited my .vbox file, I had to change <DVDImages>...</DVDImages> to just <DVDImages /> to "eject" the DVD with the duplicate UUID. – JPhi1618 Dec 1 '14 at 20:31
  • Note that if the VM has snapshots you'll also have to do the same steps on the vdi files in the "Snapshots" folder. – laurent Jun 30 '15 at 8:05
  • Very helpful. Especially important here is that the UUID's are just string values, you can get them through any methods you choose. Key thing is that they are unique as pasted into the VBox file. Whew. – pauljohn32 May 17 '20 at 3:13
  • Works like a chamr. Quick and easy solution, thanks! – Vasilis Lourdas Dec 5 '20 at 16:31

I've found a simpler way to do it.

Clone the existing virtual machine. This creates a new version with presumably a new uuid, but in all other respects it is the same machine.

Then copy the one you want to add, to your \user(your name)\Virtual Box VMs\ (or wherever the location is for your virtual machines) and overwrite all the existing files there, to replace the existing machine.

I would back up the existing machine first just in case, before doing that, but it worked just fine here. Used it to go back to an earlier backup of a VM while keeping the existing version as a clone.

  • if you have enough disk space, this is the easiest way, thanks Robert. – sddk Sep 7 '16 at 14:05
  • If any one does this - they should make sure the vbox file has a hardware uuid tag that matches the machine uuid :: <hardware uuid="{...}" >, then they can change hard disk uuid and machine uuid with out any issues. <hardware uuid="{...}" > – StixO Jan 1 '19 at 17:56

I realize this is an old post but I ran upon this error. I resolved it by:

  1. Open Virtual Box Manager
  2. Right click on the virtual machine in the Virtual Box Manager
  3. Click "Remove"
  4. A pop-up will appear. Choose "Remove only" which will simply remove all traces of the virtual box from the Virtual Box Manager
  5. Close the Virtual Box Manager
  6. Using the Linux file manager, browse to the folder containing the virtual machine
  7. Delete (or move) everything EXCEPT the .vmdk virtual hard disk file
  8. Open Virtual Box Manager
  9. Click "Machine"
  10. Click "New"
  11. Name the new machine (I used the same name as I originally used)

    NOTE: The name of the machine is will become the name of the directory that will contain the virtual machine so choose wisely and also note that if you want the .vmdk file to reside in the new directory that it will take additional steps in Virtual Box Manager

  12. Select the proper Type and Version for the virtual machine that was having the issue and click "Next"
  13. Select the memory size you want the virtual machine to have allocated and click "Next"
  14. Select "Use and existing virtual hard disk file" and select it by browsing to it's location
  15. Select "Create"

Simply follow the prompts from there and then start the virtual machine.

Everything runs fine, no re-activation of windows or etc. required.


You can also clone the existing machine then go into settings and change the storage to use the .vmdk that you had copied earlier.


If you are unable to launch due to this error, simply 'Remove...' the entry from the 'Oracle VM VirtualBox Manager'. This will clear the conflict and you will then be able to open the VM from its new location.

...At that point you can perform a clone if that is what you intend. In my case, no additional effort was required since I no had no further need for the original location of the VM.

  • This is by far the simplest solution, and not only that, it works. – shmu Jul 8 '19 at 6:45

I was successfully doing it by just change machine UUID and Harddisk UUID. I don't need to change image uuid to done it


User TGR got it right, but I had to make one additional change: In the vbox XML I needed to change the Image uuid to match the HardDisk uuid (the second UUID generated on the command line)

   <StorageController ...>
     <AttachedDevice ...>
       <Image uuid="{ [second UUID] }"/>

I've found another way simpler than any other. You only have o delete the virtual machine from Virtual Box interface (if it asks you if you want to delete the files of the VM, respond NOT!, or you'll lose the VM). And then go to the .vbox file and open it (with Virtual Box). It should work because you have deleted the UUID (while deleted the VM). At least it worked for me...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.