Installing VirtualBox 2 On A Debian Lenny Desktop
Author: Falko Timme
This tutorial shows how you can install Sun xVM VirtualBox 2 on a Debian Lenny desktop. VirtualBox is available as a package from the official Debian Lenny repository, but it's very old (version 1.6.6), therefore I explain how to install the current version (2.1.4 at the time of this writing). With VirtualBox you can create and run guest operating systems ("virtual machines") such as Linux and Windows under a host operating system. There are two ways of installing VirtualBox: from precompiled binaries that are available for some distributions and come under the PUEL license, and from the sources that are released under the GPL. This article will show how to set up VirtualBox 2 (2.1.4 at the time of this writing) from the precompiled binaries.
As of version 2 VirtualBox supports 32 and 64bit host and guest operating systems (if you want to install 64bit guests your processor must support hardware virtualization and, of course, the host operating system must be 64bit as well).
This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
Installing VirtualBox From Precompiled Binaries
First, we install the packages gdeb, gedbi, and gdebi-core. Open the Synaptic Package Manager (System > Administration > Synaptic Package Manager):
You can use the search function to find the three packages. Select them for installation and click on Apply. Close Synaptic after the packages have been installed:
Open Firefox and go to http://www.virtualbox.org/wiki/Linux_Downloads. For Debian Lenny, click on the i386 or AMD64 link (depending on if you have a 32 or 64 bit host operating system) right of Debian 5.0 ("Lenny"):
In the Firefox download dialogue, select Save File...
... and download the package, e.g. to your desktop (/home/falko/Desktop in this example):
After the download has finished, open a terminal (Applications > Accessories > Terminal)...
... and type
to become root.
to install VirtualBox (make sure you use the correct path; also the package name can differ, for example if you have downloaded the amd64 version or if there is a newer version - use the TAB key to use autocompletion in the terminal).
During the installation you will see the following message. It says that the user that runs VirtualBox - that's the user you're logged in as on your desktop - must be a member of the vboxusers group:
To add the user falko to the vboxusers group, we run
usermod -G vboxusers -a falko
in the terminal, delete the VirtualBox package...
rm -f /home/falko/Desktop/virtualbox-2.1_2.1.4-42893_Debian_lenny_i386.deb
... and close the terminal afterwards.
To start VirtualBox, go to Applications > System Tools > Sun xVM VirtualBox (if you don't see the VirtualBox launcher, log out of the desktop and back in again):
When you start VirtualBox for the first time, you are prompted to accept its license:
Afterwards, type in your name and email address to register your VirtualBox installation:
Click on OK in the registration confirmation window:
That's it! You can now use VirtualBox to create virtual machines: