Install virtualbox on Ubuntu

This is a guide on how to setup Virtualbox on Ubuntu. We use 'virtualbox-qt 4.1.2-dfsg-1ubuntu1', a Virtualbox package for Ubuntu Desktop version 11.10 for this example.

Download and install Virtualbox

It's easier to download and install Virtualbox using Ubuntu Software Center. Open Ubuntu Software Center from the left panel menu on the desktop and type 'virtualbox' in the search textbox. See screenshot example below:

Choose Virtualbox from the result and click install button to begin the installation. If you want to read more information about this software, click 'more about' link before you click the install button. There are some comments and reviews from other users about the software.

After we click the 'Install' button, Ubuntu need to authenticate, so we have to provide our account password.

Wait for download to finish and Ubuntu Software Center will automatically install Virtualbox for us.

Setting up virtualbox on Ubuntu

Now that we have Virtualbox installed in our computer, we are going to setup a virtual machine on Ubuntu. There is an explanation here in this window about Virtualbox Manager. It's important so here what it says:

Oracle VM Virtualbox Manager: The left part of this window is a list of all virtual machines on your computer. The list is empty now because you haven't created any virtual machines yet. In order to create a new virtual machine, press the New button in the main tool bar located at the top of the window. You can press the F1 key to get instant help, or visit virtualbox website for the latest information and news.

At the top left of the window, there is a 'New' button. Click on this button to create a new virtual machine.

VM Name and OS

A new window pops up. This is a wizard to create a new virtual machine. Here is what it says:

Oracle VM Virtualbox Manager: Enter a name for the new virtual machine and select the type of the guest operating system you plan to install onto the virtual machine. The name of the virtual machine usually indicates its software and hardware configuration. It will be used by all VirtualBox components to identify your virtual machine.

The instruction is clear. So type a name for our virtual machine's name such as 'Ubuntu Server'. In the OS Type section, choose 'Linux' for Operating System and 'Ubuntu' in Version. Click Next when you are done.

Memory

Now we need to provide memory size for our virtual machine. Here what it says in the wizard's window:

Oracle VM Virtualbox Manager: Select the amount of base memory (RAM) in megabytes to be allocated to the virtual machine. The recommended base memory size is 512 MB.

If you have large RAM in your computer (more than 4GB) and you are planning to install Ubuntu Desktop or Windows, then you can provide more memory size, for example 1024MB. Click Next when you are done.

Create new virtual disk

Our next task is to create hard disk for our virtual machine. Here is the explanation from Virtualbox Manager:

Oracle VM Virtualbox Manager: If you wish you can now add start-up disk to the new machine. You can either create a new disk or select one from the list or from another location using the folder icon. If you need a more complex virtual disk setup, you can skip this step and make the changes to the machine settings once the machine is created. The recommended start-up disk is 8.00GB.

This is our first time setting up Ubuntu Virtualbox, so choose create new hard disk. Click Next to define our hard disk space.

Welcome to the new virtual disk creation wizard

Another wizard is going to help us create hard disk space for our virtual machine. The wizard's explanation is excellent:

Create New Virtual Disk Wizard: This wizard will help you to create a new virtual disk for your virtual machine. Use the Next button to go to the next page of the wizard and the Back button to return to the previous page. You can also press Cancel if you want to cancel the execution of this wizard. Please choose the type of file that you would like to use for the new virtual disk. If you do not need to use it with other virtualization software you can leave this setting unchanged.

We are going to install Ubuntu server as guest operating system in this virtual machine. So we take the default setting and click Next.

Virtual disk storage details

Create New Virtual Disk Wizard: Please choose whether the new virtual disk file should be allocated as it is used or if it should be created fully allocated. A dynamically allocated virtual disk file will only use space on your physical hard disk as it fills up, although it will not shrink again automatically when space on it is freed. A fixed size virtual disk file may take longer to create on some systems but is often faster to use.

Virtual disk file location and size

Create New Virtual Disk Wizard: Please type the name of the new virtual disk file into the box below or click on the folder icon to select a different folder to create the file in.

Summary

This window shows a summary of how we configured our virtual machine:

Create New Virtual Disk Wizard: You are going to create a new virtual disk with the following parameters:

Create New Virtual Disk Wizard: If the above settings are correct, press the Create button. Once you press it the new virtual disk file will be created.

This is it. Click Create button to begin creating a new virtual disk. The process will take about a minute (or less). When it's done. we'll get a new virtual machine in the left pane of the window as in the picture below: