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,
http://ftcreator.blogspot.ca/2012/03/virtualbox-how-to-create-virtual-pc.html

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.

Tuesday, March 20, 2012

VirtualBox: How to Create a Virtual PC

Create a VPC in Oracle VM Virtual Box

1.Click on the New button

2. Click Next

3. Give a Name for the New VPC and select the Operating system and the Version

4. Give a Value for the RAM in the VPC


5. Select the existing Hard Disk from the drive
6. Click on Create :)

7. Congratulations you are done with that.

But if you are getting this error
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.