Booting Windows Xp as Guest inside Ubuntu Hardy both in same harddrive using VirtualBox
You will have a question like can i boot my Windows XP or Vista inside Ubuntu of any Linux when they all reside in the same hard disk. The answer is here. The first step for that is you should create a virtual image of your hard drive.
Step 1: Creating Virtual hard drive.
$sudo VBoxManage internalcommands createrawvmdk -filename ./WinXP.vmdk -rawdisk /dev/sda -relative -register
You will get a “RAW host disk access VMDK file ./WinXP.vmdk created successfully.”
Step 2: Adding the Virtual disk file to the Virtual Box.
Open VirtualBox and choose the menu File->Virtual Disk Manager and in the window that opens click on the Add option and choose the recently created vmdk file (WinXp.vmdk)
Step 3: Creating a New Virtual Machine
Click on the New option and in the Create New Virtual Machine wizard, click Next
Enter the OS Name as WinXP and OS Type as Windows XP, and Click Next
Select the Memory based on the availabilty. In my case i have 2 gb Ram and so i selest 330 mb. And Click Next
Here comes to select the Virtual Hard drive file. Click on Existing option
Select the recently created vmdk file. (WinXP.vmdk)
Click Next and then Finish option.
Step 4: Editting the Settings of the Virtual Machine
Select the recently created virtual machine (WinXp) and Click on the Settings page. And enable Audio, Serial Ports, USB ports, CD/DVD drive as host cd/dvd drive, etc
Goto Shared Folders option and select a shared folder created some where previously (here i have selected /tmp/VirtualBox/SharedXP, which i created previously)
Now select you Start option, and for your surprice you will see your grub menu…
Note: Here in grub, the first option is the ubuntu which iam already in, its not adviced to select it again, select the Virtual OS type you have choosed already.














Thanks, Ive been looking for how to do this.
But, will the virtual machine then update if I boot up in windows properly (rebooting the machine and selecting windows off grub) and change something/install a program?
Thanks,
Gaz
When you go to XP directly or via Virtual box, the changes you do in both will be reflected in both. The Virtual hard disc file is just a reference file, not an entire image of the harddisk, you can understand that by looking at the size of the file itself.
So if you install a software in xp when you are directly using it, it will be reflected when you are using xp as a guest via Virtual Box. Also if you install any software when using via Virtual box, will be reflected when using it directly.
How you understood. Thank u.
Rosario
I did this some time before by using an old vmware-vm, which had direct access to my harddisk. Nice to know a standalone solution for VirtualBox.
My only problem is, that the Windows asks for activation when booted as virtual machine.
Do you know a solution to this?
I dont know about it, as i didnt get the errror.. But can help you if you send me the screen shoot of the error you are getting… send the screen shoot to rosarioarun_at_gmail_dot_com