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.

No comments: