Installing Ubuntu inside Windows XP using VirtualBox

Since moving companies over a year ago I've missed my Ubuntu desktop having moved back to development on Windows. I've had a few comments that some of my old Ubuntu blog posts are now out of date and I've wanted a way to ensure that they remain 'correct'.

After discussing virtualisation with a friend I opted to install VirtualBox - an open source virtualization tool which is free and easy to get going. This blog post contains my installation notes from installing VirtualBox and then creating an Ubuntu9 virtual machine...

First I downloaded the latest version of VirtualBox (version 3.0.0) and selected the "VirtualBox 3.0.0 for Windows hosts". Then I downloaded the latest version of the Ubuntu Desktop edition.

After both of these were fully downloaded I double-clicked the VirtualBox installer and choose to install everything.

  • When the "not passed Windows Logo testing" alerts pop-up choose to "Continue anyway" then register if you wish.

  • Once it's all installed run VirtualBox and click "New" to create a new virtual machine.

  • On the "VM Name and OS Type" page I entered "Ubuntu9" as the name, and for the operating System I chose "Linux" and "Ubuntu" as the version. On the "Memory" page I chose the default option, same for the "Virtual Hard Disk" setup.

  • Within the "New Disk Wizard" I chose "dynamically expanding storage" for the "Hard Disk Storage Type".
This will have just created a new virtual server called "Ubuntu9" in a "powered off" state.
  • Right-click "Ubuntu9" and choose "Settings...":


  • Click "CD/DVD-ROM" on the left-handside, then click "Mount CD/DVD Drive", choose "ISO Image File" and click the folder icon to the right-handside:


  • The Virtual Media Manager windows appears.
    Click "Add" and browse to where the downloaded Ubuntu ISO image was saved and click "Open". Then click "Select".


  • You will now be back at the Settings window, just click "Ok"

  • Now select "Ubuntu9" and then click the "Start" button
The virtual server now starts with the Ubuntu disk image auto-mounted and boots from this image. Use the cursor keys to select your default language and then choose "Install Ubuntu".

Ubuntu will start to install and load up the Gnome based installation wizard.
  • Select your language, timezone and keyboard layout when prompted.

  • You will now be presented with the disk formatting screen - choose "SCSI1 (0,0,0) (sda) 8.6GB ATA VBOX HARDDISK"


  • Enter some user information and login details and then click the "Install" button - this was a little scary as the host box is my main PC and although I'm running the installation via the VirtualBox it's still felt strange thinking that I might be clicking to reformat my main drive with Linux...
Ubuntu will automatically install after the disk formatting is complete, this can take a while. If it gets stucks at the "checking mirrors" stage then you might have some issues with the networking setup - the Ubuntu setup wants to be able to connect to the internet. I had to change my network settings from "NAT" to "Bridged" to get it working on my system.


If everything went ok you should now now be able to un-mount the Ubuntu disk image (via the Settings option) and start up your new Ubuntu machine:


That's it you can now use Ubuntu as if it was installed as your primary OS!

Technorati Tags: , , , , ,

5 comments:

Slack Aliss said...

You're going to get bitten by that dynamically resizing virtual disc file... http://slackaliss.blogspot.com/2009/08/virtualbox-on-windows-hosts.html

Andy Kayley said...

Good job, I did the exact opposite of this. i.e. installed virtual box on ubuntu to run windows xp, for when I wanted to use itunes and ie

abeacock said...

I never knew that VirtualBox was so popular!

Anonymous said...

When I install ubuntu I've face memory problem even I have 1GB

vijesh said...

it is very good but space problem am going to expand my memmory anyway good job...