How to install Virtualbox & run Windows XP / Office 2007 in Ubuntu
Virtualbox is a virtualisation package for Linux originally developed by Sun Microsystems. It’s an incredibly powerful and easy way of being able to run Windows XP or Vista from Ubuntu. This guide will talk you through the process of installing Virtualbox, after which we’ll look at installing Windows XP. Running XP inside Ubuntu has so many benefits, like file compatibility, using active-x in internet explorer and lots more.
Here’s a few shots of my PC running Ubuntu and Windows XP, BBC Iplayer and Microsoft Office 2007. Click the images for a full size view:
I took the screenshots while Compiz cube was in mid-rotate. Looks good doesn’t it? (If you haven’t done so already, I recommend you install compiz fusion!) Performance wise, Windows XP starts up just as quickly if not slightly quicker than a standard installation if you have a powerful machine. Just goes to show what a great operating system Linux can be.
How is it done?
Installing Virtualbox is quite straightforward. There’s a simple process to follow to get up and running with your XP virtual machine. That process looks like this:
1) Install Virtualbox using Synaptic package manager
2) Add your user profile to the vboxusrs group so Virtualbox will work
3) Create a virtual machine in Virtualbox
4) Install Windows XP (from CD in this post) on your new virtual machine
5) Booting your virtual machine from the Windows XP installation CD
Installing Virtualbox using Synaptic Package Manager
Open Synaptic (System>Administration) – search for “virtualbox-ose” and install.
Add your user profile to the vboxusrs group
Once Virtualbox is installed, you’ll have to add your user profile to a group created by the install process called vboxusrs. Time to start using Terminal – here’s the command:
sudo adduser [your username] vboxusers
Create a virtual machine in Virtualbox
You’re now ready to start the application (Applications>System Tools>InnoTek VirtualBox) – here’s how it looks:

We’re going to create a new virtual machine called WinXP-2 so you can see the process from start to finish. There are about 8 steps to follow, begin by clicking the “New” button.
![]() |
![]() |
The virtual machine wizard dialogue. Click next to get started, give the new machine a name and select the type of OS you’re going to install.
![]() |
![]() |
Give the new machine a name and select the type of OS you’re going to install.
Create a “dynamically expanding image” – if you use up all the available space the disk image you’re creating will expand.
![]() |
![]() |
Now select the actual size of the image. This is how much virtual hard disk space you’ll have to play with when you first boot the machine. When you click next you’ll be given a summary of what’s happening so far.
![]() |
![]() |
You’re now taken to the Virtual hard disk dialogue and your new hard disk has been created and should display in the drop down. Click next. You’re given one final confirmation and that’s it, click finish.
Booting your virtual machine from the Windows XP installation CD
Clicking finish will take you back to the virtualbox user interface. Clicking “start” will initiate the first run wizard. There’s no need to use the wizard, actually it’s quite important to get used to the settings dialogue.
To be able to get your virtual machine booting from an XP install cd, we need to mount the CD/DVD drive. Click the settings button and you will see this window – click the CD/DVD-ROM tab.
Make sure you select the “Mount CD/DVD Drive” checkbox.
While you’re in the settings window, familiarise yourself with the different tabs. Particulary, “Network” – it’s worth taking a look and making sure that the “cable connected” check box is selected – which enables your new virtual machine to get an internet connection. When you’re done, click OK.
Finally, with the Windows XP installation CD in your drive, click the start button. With any luck you’ll see a new installation happening right in front of you!
Once you’ve got XP completely installed, you might want to install the guest additions ISO, which will allow you a full screen resolution and a lot of compatibility between Ubuntu and XP. I’ve just published a post about doing this here. Enjoy!
















39 Responses to “How to install Virtualbox & run Windows XP / Office 2007 in Ubuntu”
Leave a commentVery useful post thanks!!
no cube ): everyone loves that cube..
you might want to add that if you turn off emerald with metacity –replace you can run windows seamlessly in virtualbox…it’s a beautiful setup…
so confused. im a bit of a noob, need more explanations. at least i got ubuntu running…
Great tutorial, thanks!
@ ALLEN
It’s pretty easy, whats the problem apart from the fact you are not going to be able to get the USB port to work on your guest OS (The tutorial didn’t deal with that fact) .
Enable USB Support in Virtualbox
By default USB support was disabled in virtualbox, so you’ll probably want to enable it. Otherwise you’ll get an error when you go into the “Settings” of your virtual machine. To correct this, you’ll need to edit the mountdevsubfs.sh file
sudo gedit /etc/init.d/mountdevsubfs.sh
Inside, you’ll see a block of code that looks like this
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb
Change it to look like this (uncomment out the region by deleting the “#’s”):
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb
Save the changes and exit.Now log out, and then log back in again for the changes to take place.
I’m having trouble getting the usb ports active in my virtual machine. The file which was opened when i ran
sudo gedit /etc/init.d/mountdevsubfs.sh
as suggested was blank. Any ideas?
Cheers,
Sam
to the poster – virtualbox was ORIGINALLY developed by innotek. you really should read this – http://www.sun.com/software/innotek/. it is great software, and i’m not sure if this changed since sun acquired them but it used to be the compiled binaries supported usb etc and the ose (open-source-edition) that is in the repositories did not have that and some remote features etc. correct me if this has been added since sun acquired them!
Nice post. Now you can point the readers to the Seamless Windows with Compiz-Fusion in Ubuntu Forums.
I run it here on my machine, for the one program in windows I must have. I get all the effects, and it works great. The method I used doesn’t seem to mind emerald, either.
Just a note: I had to install virtualbox-ose-modules-generic before I could start virtualbox.
sudo apt-get install virtualbox-ose-modules-generic
What system requirements do you need to get this to work nicely. I have 2 ghz athlon 64, and one gig ram, and 8500 nvidia card.
nice post, thank you.
Nice one will try once with my Ubuntu box, Thankx
I’m sort of not-so-linux-knowledgeable… but I guess this tutorial should work for Kubuntu as well, right?
Thanks!
(BTW, this is fantastic news: I am still dependent on some Windows programs)
Hey I tried to do as above however when I am asked to agree to the lisence agreement of windows in the setup it needs me to press F8. It doesn’t read this it just adjusts the brightness of my mac! Is there any way to get around this? When i press other keys it works!
@Tom Moss
Hi Tom! That’s quite a problem. It sounds like Vbox isn’t listening to your keyboard, or the host key has been pressed. You *should be able to get round this by clicking with the mouse in the vbox window first. Let me know if that works, and sorry if you’ve already tried.
I’m actually not a MAC person (I’m an Ubuntu?!) But I did find this: did find this. Hope that’s useful!
I have been trying to install XP in Virtual Box for a few days now, but can’t get it to work. Both of my XP install disks are multi disk installs. The first is the Gateway OS install disk that came with my laptop. It starts off with a red driver disk and then asks for the blue OS disk. When I stick the blue OS disk in, it won’t read the disk.
The Second is an XP home upgrade disk. I stick the XP disk in and it starts alright. Then it prompts for a previous version of Windows. I stick in the 98 disk and it verifies and asks for the XP disk again. When it gets to that point it fails.
I am running on Ubuntu 8.04 with 2.8ghx processor and 1.5gigs of RAM.
Hi There E. Zachery. Yeah, you’re going to need a full xp install cd, not an upgrade disk. There’s no point messing around with old upgrade cds / OEM installation CD’s for branded machines. Get an XP licence and you’ll be fine!
Thanks Richard. I actually found a way to work with upgrade disks. I haven’t tried the trick for OEM disks though.
Basically, I made a iso copy of all the disks in the process and used the cd change icon in the VirtualBox window to swap isos when disks needed swapping. Worked like a charm and I am now installing XP.
I will touch back when I try it with my OEM disk.
I tried the OEM disks the same way with the ISOs. It installed just fine, but does not recognize that it is on the same original laptop. So it treats it like a 30 day trial.
Oh well. Not much I can do there as OEM licenses are not transferable.
Yeah – you’ve got to get a full Windows XP licence. If I were you I’d get a new CD too! Thanks for the update!
at step 4 it says “(from CD in this post)” but there is no “CD” in this post so what do I do?
@alienkid – step 4 is the bit where your virtualbox machine is ready to boot into a windows XP installation CD. If you don’t have one, make one. You’ll need a Windows XP licence.
I have a full XP install disk and VirtualBox works great on my Mac, but when I put the XP disk in, I get a “you’ve put a blank disk in” message. What gives? (And I am a little technologically challenged.”
I wiped out my Windows OS on Dell Dimension 2400 desktop and completely installed Ubuntu Hardy Heron about six months ago. Now I would like to be able to use software that is only Windows compatible.
1) Please confirm that I understand correctly: To install WinXP in Virtual Box, I CANNOT use my Dell re-installation CD. I will need a new installation disk with a new license.
2) If I cannot buy a WinXP disk, can I install Vista Home Edition on Virtual Box instead?
System: 63G hard disk free, Intel Pentium 4, 2.80GHz CPU, highest grade NVidia compatible graphics card for age of computer. Will this handle Vista?
3) Not sure I understand how I can run Windows software on an Ubuntu system. Doesn’t Windows software require MS drivers?
nice it works very well.
cpts
Great tutorial. But mine seems not working. It kept popping up this message whenever I tried to click ‘start’.
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing
‘/etc/init.d/vboxdrv setup’
What does that even mean? I dug into “init.d/vboxdrv” folder, however there isn’t a “setup” function, neither can I change any permission issues.
Can anyone help me out?
No CD in this post… So in other words you should either have a version of XP on CD with a key code or go to Pirate Bay and download a student version that has one. From what I hear the student version is capable of running on multiple machines without the proprietary Mr. Burns drama that comes from the other versions.
I installed Ubuntu in the first place because my system was booby trapped by Microsoft/HP via a “code purple”. When you do something silly like install more RAM and have to do an inedible system restore later, you get a nice message telling you that your system has a config error and the only way to fix it is to get it repaired for hundreds of dollars or just buy a new one
I have a legit version of XP somewhere on my restore drive but can’t access it because I’ve been locked out buy THEM.
I REFUSE to spend another cent on anything Windows. It’s off to Pirate Bay I go to borrow a student version of XP then.
SICK!
I WAS able to get this to work using a borrowed copy of XP from TPB! Sorry about that Bill… oh wait NO I’M NOT! HA!
Oh and rather than the student version I just went with my original XP 2005 Media Center, but you can choose Vista or whatever you want.
When I try to instal Office 2007 to XP running in VBOSE, I receive a message the program cannot run without windows installer 3.1. I do not see any part of this post dealing with installing Office 2007 after XP is running within VBOSE, perhaps I am missing something very obvious (which is likely) please help. Thank you.
For some reason, setup thinks my disk is an upgrade disk, but it is not. This is a legit full install disk with the packaging and the holograms on the front of the disk and everything. Because of this, it gets stuck on an early screen looking for a Windows disk (old version to verify that the ‘upgrade’ is valid?). Any ideas? I’m running an HP w/ an AMD Turion (don’t remember the speed, but it’s only ~18 months old), with Ubuntu 9.10 (karmic), 10GB for VirtualBox, 120GB free, 3GB RAM. Ubuntu works great, but I need TWO windows programs for work. Help, please.
Thanks
Great tutorial, but I’m having a problem, maybe somebody can help me.
I’ve installe Ubuntu 9.10 on a Acer Aspire 6530G with amd turion 64 bit. Installed VirtualBox OSE without problems.
Now I want to install Windows XP in VirtualBox, but I cannot. I’ve got a Windows XP installation cd and when I boot it in my XP machine after few seconds of the installation it freezes everything. I thought it could be a problem of the 64bit architecture, so now I’ve got a Windows XP 64bit installation cd, but when I started the machine and the installation should begin I receive a “Enable the local advanced programmable interrupt controller (APIC). The x64-basederating system you are loadig does not have APIC enabled. Check the system’s firmware settings and make sure that does not have an APIC setting, please contact the system manufacturer for a firmware update to enable the local APIC.
Setup cannot continue. Press any key to exit.” message.
Now I’ll try with another Windows version, but I’m a bit stuck…
Ok, I found out that in the settings there is the choice to enable APIC i/o, but now I’ve got the same problem as with the 32bit installation disk: when the installations says that windows will be started everything freezes slowly and at the end I have to abruptly end the ubuntu session and restart the system… any idea?
Hi, I noticed that I have the exact same problem described by nittalope above. Any insight into this issue would be greatly appreciated.
Iam sory, I want to instal Window xp 2007 can you help me ?
3 Trackbacks
[...] guide to set it up. Want to run Office 2007 or Windows XP from inside Ubuntu? Use this guide to install Virtualbox. Want to have that amazing 3d cube desktop? You’ll need to install Compiz. Want to make your [...]
[...] the sheer complexity of what is going on underneath. A reasonably accurate tutorial can be found here, though the user-grouping stuff is done automatically nowadays. You will likely need to install the [...]
[...] that feature different social media buttons in your top left hand corner. Take a look at these two different page types to get an idea of what I’m [...]