My perfect server – Part 3
The third part of this series is about configuring the host system and Virtualbox. All this is done to get some virtual machines running. We start by installing Virtual Box which is my favorite virtualization software. You can install each software you like, there are many other virtualization software products, some Open Source and other commercial as I describe in part 1.
Installation
You can install Virtual Box over your preferred packet manager, but normally you will get an old version. You may install it with this command:
sudo apt-get install virtualbox
I do not prefer this method. A better solution is to get the current version directly from the homepage of Virtual Box. There you find installers software for all supported systems. For Linux you will get sources for your packet manager.
Install current version
For the current version we need to extend our sources list file. For this, open the sources list file:
sudo nano /etc/apt/sources.list
At the end of the file you should add the following lines. These are for the Virtual Box Repository. The first line is only a comment:
#From https://www.virtualbox.org/wiki/Linux_Downloads deb http://download.virtualbox.org/virtualbox/debian precise contrib
Currently debian precise is available. You can find the current list of repositories here. It is a good idea to choose the version that is suitable with your linux version. Ubuntu 12.04 is based on precise reporitory, so I choose this.
Next we should get the public key file for apt-get:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
Now, everything is ready. You can now install Virtual Box with your packet manager. Currently version 4.2 is the newest one:
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install virtualbox-4.2
Install extension pack
For Virtual Box you typically need to install an extension pack. This is needed for USB 2.0 support. You can do this on your graphical system. If you only run your host system on terminal, you can install this extension pack too. First you should check which version of Virtual Box you use:
VBoxManage --version
I have 4.2.16r86992. With this in mind, we get the extension pack with this commands:
cd ~ vbox_ver="`VBoxManage --version`" wget "http://download.virtualbox.org/virtualbox/${vbox_ver%%r*}/Oracle_VM_VirtualBox_Extension_Pack-${vbox_ver/r/-}.vbox-extpack"
This will install the extension pack file into your home directory. The last thing is to install it:
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-${vbox_ver/r/-}.vbox-extpack
Perfect! Now you are running the most current version of Virtual Box with extension pack.
Next part is about working with Virtual Box over network and how to set up new virtual machines.