Wednesday, March 21, 2012

How to change UUID of VirtualBox vdi and VHD

ERROR: Cannot register the hard disk '/*/*.vmdk' with UUID {af38d7f6-a3e0-448a-95a9-4a06ab5e07bc} because a hard disk '/*/*/test_virtual_machine.vmdk' with UUID {af38d7f6-a3e0-448a-95a9-4a06ab5e07bc} already exists in the media registry ('/*/*/.VirtualBox/VirtualBox.xml')

Or this Error
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

To troubleshoot this,
1.1 Open Command Prompt in Administrator mode, and then go in to “C:\Program Files\Oracle\VirtualBox
Cd C:\Program Files\Oracle\VirtualBox

If you run “Dir” you can see all the files in there

Then run “VBoxManage internalcommands sethduuid /path/to/virtualdisk.vdi

NOTE: The command has been changed in previous versions on the Virtual box. So in that case command in there would be…
VBoxManage.exe internalcommands setvdiuuid "C:\path\to\new\vdi"

IN my case I’ll run it as “VBoxManage internalcommands sethduuid D:\Share\win2008R2\NewVHD1.vhd
Because I’m using Virtual box Version 4.1.8

Congratulations again. VPC will work now.

If you want co configure a VPC in Oracle VM VirtualBox please see this Post,

If you are running Windows 8 and  if you get below mentioned error,

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execu
tion failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or
failed to start.
Then what you have to do is Close all the  Oracle VM applications running and try to chaneg the UUID in command line. this should work and make sure to run CMD in Run as administrator mode.


ChieftainY2k said...

Thanks, you saved my day :)

teja said...

Thanks Boss u really saved me in right time

teja said...
This comment has been removed by the author.
Anonymous said...

thank you

Anonymous said...
This comment has been removed by the author.
Unknown said...

Your post is superb. Thanks for sharing us updated information.