Virtualize your XP partition from Ubuntu with VirtualBox

vbox_logo2_gradient.png In order to show you the VirtualBox potential, and make easy the migration to Ubuntu for the users of XP, who want to use it from Ubuntu. We are going to see how you can virtualize an made XP partition from Ubuntu 8.04 suing VirtualBox.

We can find the same solution with VMware Workstation at Kriptópolis (Spanish), but this product can be used 30 days. I probed with the free VMware Server product, but it do not provide the partition virtualizing property.

Then with no doubt we can say that VirtualBox is the most durable solution, although Open Source.

Ensure the correct VirtualBox Edition

Take care at first on the installed VirtualBox version, it must be the commercial one (not the OSE one). The other has not the possibility to visualize physical partitions, from a Virtual Machine. We take the explanation of this at this link.

Copy a Hardware Profile in our Windows XP System

The next caution is to create a sencond “Hardware Profile” at our XP System, because when we boot our Virtual Machine the hardware is the standard provided by VirtualBox, and XP will start to detect and install, and remove the old drivers.

On this way we could boot our XP partition from GRUB choosing a “Hardware Profile” not modified. We can create this profile at: Right mouse button over My PC > Properties > Hardware > Hardware Profiles > Copy; and create the second Profile “Profile 2″ which will be the modificated on the first boot from VirtualBox:

xp_mipc_perfiles.PNG

Create a Virtual Machine

First we have to create the Virtual Machine with the usual steps.

Create anew machine:

VB.01.Crear_Nueva_VM.png

Selectin Windows XP as guest System. In the next screen we have to asign the RAM memory:

VB.02.Asigna_memo.png

We do not assign any Virtual Hard Disc, we will do it through the terminal in the following point.

VB.03.Disco_duro.png

Linking the VM to the partition

At the poit 9.9 in the VirtualBox Users Manual we have the way to procceed to create a Virtual Hard Disk, from a physical partition. Execute the following command:

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -register

Then we will create the Hard Disk file.vdk referenced to the /dev/sda device.

To use this disk you must to add your user to the disk system group (to manage dthe sda device)P:

sudo usermod -a -G disk

Open the file /etc/group and modify your user in a line like this (to manage the applicatiion):

vboxusers:x:120:USUARIO

Reboot the system to make theese changes. And bind the HD file to the Virtual Machine with the following command:

VBoxManage modifyvm XP_ant -hda /path/to/file.vmdk

Finally …

We must not have any problem booting the VM, in the following image you can see my XP Desktop from Ubuntu:

VB.pantallazo.XP.png

4 thoughts on “Virtualize your XP partition from Ubuntu with VirtualBox

  1. ~$ sudo usermod -a -G disk
    usermod: user disk does not exist

    wow, this didn’t go very far did it?

    Does anyone really know what they’re doing? :( it seems that many people get advice that simply messes up other people’s systems (in other ‘tutorials’ people report damaging their mbr and get all kinds of problems, because the ‘instructions’ are simply a ‘I did somehing a little bit like this, and you have to work out what I’m doing and modify it to do it yourself – in which case you don’t need my ‘tutorial’ at all’.

  2. /dev/sda is linux partition (by default,with a number at the right)
    you should find which /dev/sd[b,c,d,etc…][1,2,3,4,etc…] is the xp partition
    then you give the command

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>