25 October 2012

VirtualBox: Cannot register (hdd/dvd ..) because UUID already exists

just in case you're using VirtualBox for virtualisation and you run into this issue
(might happen if you copy or clone your vm's):

Strategy is quite simple:


  1. Write down the problematic uuid!

  2. generate new uuid for the problematic device

  3. manually replace old uuid by new in vbox file



Now for the details:

1.) copy the problematic uuid from virtualbox error message

2.) Bradley Schacht published the first steps of a solution on his blog:

He wrote the solution for windows, in MacOS you have to cd into the Contents of the Virtualbox.app directory:

/Applications/VirtualBox.app/Contents/MacOS


Now issue the magic command:

VBoxManage internalcommands sethduuid PathOfYourHD



  • On MacOS, watch for lower- and uppercase.

  • The PathOfYourHD should be your existing VDI-file.



Output of the vboxmanage tool should be:
UUID changed to: 3518e10a-64f2-405a-afa7-437643af08f4


3.) Open the corresponding vbox-file (which contains the xml-definition of your vm) in any decent text editor and search for the problematic uuid (for example HardDisk uuid="{3518e10a-64f2-405a-afa7-437643af08f4})

Manually change ALL occurances of the OLD uid to the newly generated one.

That's it.





No comments: