Installing Windows 7 on Ubuntu 13.10 using VirtualBox 4.3

Sometimes you just can’t get away from Windows. If you’ve got a beefy enough computer and you don’t want to dual-boot one option is to run Windows in a virtual machine. This requires virtualization software such as VirtualBox which is what we’ll use in this tutorial. This tutorial assumes you have some basic skills with the terminal.

VirtualBox Download and Installation

You can download VirtualBox directly for your distro here, or you can add the repo to your distro’s package manager. I’m going to use the package manager here.

I’d prefer not to modify my /etc/apt/sources.list file as the VirtualBox download page suggests. Instead, I will create a file called virtualbox.list in the /etc/apt/sources.list.d directory:

sudo nano /etc/apt/sources.list.d/virtualbox.list

Add the following line to file and then save and exit (press Ctrl-x, answer y, then hit Enter):

deb saucy contrib

Set the permissions on this new file:

sudo chmod 644 /etc/apt/sources.list.d/virtualbox.list

Download the Oracle public key here and then run this command in the directory where you downloaded it:

sudo apt-key add oracle_vbox.asc

Or be fancy and just do it one command:

wget -q -O- | sudo apt-key add –

You’re almost there! Now just update your packages and install:

sudo apt-get update
sudo apt-get install virtualbox-4.3 dkms

Creating the Virtual Machine

Before you start VirtualBox you should decide if you’re looking to install a 32bit or a 64bit. If you want to install a 64bit OS you will need to make sure that AMD-V (on AMD CPU’s) or VT-x (on Intel CPU’s) is available and enabled. For me, I had to go into my BIOS and turn it on as shown in the photo below.

Enable VT-x in your bios

Enable VT-x in your bios for 64bit support

Now open VirtualBox and click ‘New’. Select the version of OS you want to create a virtual machine of and give it a name.

New Virtual Machine

New Virtual Machine

Click ‘Next’ and select how much RAM you want to give the VM. Luckily for me I’ve got 16GB in my machine so I gave the VM a healthy 4GB of RAM. Note that if the OS you selected is 32bit giving it anymore than 4GB of RAM wouldn’t make any sense.

Memory Size

Memory Size

Next you will create or select your virtual hard drive. I am creating one here since I did not have one before.

Creating Virtual Hard Drive

Creating Virtual Hard Drive

Click ‘Next’ and select the hard drive file type. I left the default because I don’t anticipate using this VM with other virtualization software.

Select hard drive file type

Select hard drive file type. I left the default VDI.

Next you’ll want to select whether the disk space allocated to this VM is Dynamic or Fixed. I prefer dynamic since my computer has lots of horse power to deal with any additional overhead that might entail.

Dynamic or Static?

Dynamic or Static? I went with dynamic.

Now you can select the location and maximum size of your virtual hard drive. I gave it 200GB and put it in a folder on my mechanical hard drive since I don’t want to take up space on my SSD.

Hard drive file size and location

Hard drive file size and location

Click ‘Create’ and you’ll be taken back to the VirtualBox window. Now you’ll need to adjust the VM settings. Select the VM on the left and then click on ‘Settings’. In the settings panel select ‘Storage’ and the click on ‘Empty’ under Controller: IDE. Then on the right ‘Attributes’ panel click the icon that looks like a CD and select your Host Drive (ie your CD/DVD/BluRay drive), for me it was sr0. When the ‘Attributes’ panel changes you can probably leave the defaults and just click ‘OK’ to go back to the main window. You probably don’t need the ‘passthrough’ mode at this point (it’s for burning disks, reading encrypted DVDs, etc).

Setup the optical drive you wish to use to install the guest OS

Setup the optical drive you wish to use to install the guest OS

Make sure your OS installation disk is in the drive and then back in the VirtualBox main window, select your VM and click the ‘Start’ button. You should see the disk to start loading the installation!

Windows setup loading on the VM

Windows setup loading on the VM

Windows 7 setup running in VM

Windows 7 setup running in VM

Good luck! Remember that the default host-key is the right ctrl key, so if your mouse or keyboard is captured by the guest OS (ie the VM) just press right ctrl to return control to your host OS.

Bookmark the permalink.

Leave a Reply

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