Before get started be sure you have all of these requirements:
- Windows XP, Vista, 7, any of the desktop Linux systems that can run VirtualBox (check the http://www.virtualbox.org/wiki/Linux_Downloads page for supported Linux distributions), Solaris or Mac OSX operating system. This is the HOST system.
- At least 1GB of RAM.
- VGA card with at least 64 MB RAM.
- At least 10GB of free disk space.
Go to the VirtualBox website and grab the latest stable release that suits for your HOST operating system: http://www.virtualbox.org/wiki/Downloads
Depending your HOST operating system install the application. The only thing you have to be careful with is the VirtualBox Networking. I had trouble with it in the past so I always disable it, although it doesn't seem to be an important feature anyway.
There are many Linux distributors on the market. We are looking for a free, user-friendly, widely supported, fast and small OS. So Ubuntu seems to be fine. Download the CD ISO file from http://www.ubuntu.com/download.
You can freely choose from the latest and the LTS releases. LTS seems to be a better choice since you don’t want a fancy desktop media center but an easy-to-use developer environment.
Create a VirtualBox Machine (VM)
Start VirtualBox, click „New” and follow the instructions.
Creating the Virtual Hard Disk
During the process the wizard will ask you to define the Virtual Hard Disk. If you choose to create a new one, it is recommended to choose the dynamically expanding storage because you can save a large amount of disk space in the first times.
In the next step choose the location or leave it default. If you want the use you virtual machine on different computers then it is recommended to define the .vdi location manually to an USB stick or portable hard drive. In this case you need to create the same VM on the other computer too and add this virtual hard disk instead of create a new one.
Configure the VM
Edit the VM’s properties and do the following modifications on the defaults:
add RAM (1024 MB is fine for development, but maximum the 50% of the physical RAM is recommended)
enable PAE/NX and leave on one CPU (we don’t need to kill the HOST)
enable VT-x/AMD-v and Nested Paging
add video memory (128 MB is fine)
leave on one monitor
enable 3D acceleration (2D acceleration is available only for Windows GUESTs)
Attach the Ubuntu iso to the VM as a CD. Start the VM.
After the VM boots up the Ubuntu installer will start. Follow the instructions.
When the installation process is about to finish, it will ask you for the credentials.
In the tutorial I will use developer for both username and password. You may choose your own.