You are on page 1of 1

Change UUID of VirtualBox vdi

Looking for quick way to reuse a vdi I prepared with Windows XP SP3 and recent updates, I decided to duplicate the vdi with Windows Explorer. Of course, this was too simple. After attempting to create a new virtual machine which used the newly created vdi, I was presented with a nasty error along the lines of Failed to open the hard disk . and Cannot register the hard disk C:\path\to\new\vdi with UUID {xxxx} because a hard disk C:\path\to\old\vdi already exists in the media registry (C:\path to VirtualBox.xml)

Launch a command prompt and browse to where VBoxManager.exe is located (for me this is C:\Program Files\Oracle\VirtualBox) and run the comand below
VBoxManage.exe internalcommands setvdiuuid "C:\path\to\new\vdi"

NOTE: the command has been changed to sethduuid in version 4.0.4 (thanks Isaac!). So the command in 4.0.4 would be
VBoxManage.exe internalcommands sethduuid "C:\path\to\new\vdi"

Which should return something similar to UUID Changed to

You might also like