Installing VirtualBox 3.0 On An Ubuntu 9.04 Desktop

Version 1.0
Author: Falko Timme
Follow me on Twitter

This tutorial shows how you can install Sun VirtualBox 3.0 (released on June 30, 2009) on an Ubuntu 9.04 desktop. 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 3.0 from the precompiled binaries.

As of version 2.0 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 open a terminal (Applications > Accessories > Terminal):

Open /etc/apt/sources.list...

sudo gedit /etc/apt/sources.list

... and add the VirtualBox repository to it:

deb jaunty non-free

Then add the public key of the VirtualBox repository to your system...

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

... and update the package database:

sudo aptitude update

Afterwards you can install VirtualBox 3.0 as follows:

sudo aptitude install virtualbox-3.0 dkms

(The dkms package ensures that the VirtualBox host kernel modules are properly updated if the Linux kernel version changes.)

During the installation, you will see the following screens:

Select <Yes> when you are asked Should the vboxdrv kernel module be compiled now?:

That's it! VirtualBox is installed now.

To start VirtualBox, go to Applications > System Tools > Sun 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, you can register your VirtualBox installation. You can click on Cancel if you don't want to do this (VirtualBox will work nonetheless).

That's it! You can now use VirtualBox to create virtual machines:


Share this page:

26 Comment(s)

Add comment


From: Anonymous

I don't need to know how to install it.  I need to know how to upgrade to it from the 2.2.4 version.


From: Miroj

Well, it is easy. Just uninstall the old 2.2.4 and install the new 3.0, and problem solved. All the settings and virtual machines will happily continue to work as used to be under the old version.

I do use the following repo on Hardy, but also works with Jaunty and Interpid.

deb hardy non-free

From: Ahmed Kamal

One would need to install build-essentials in order to be able to compile the kernel module eh?

From: Reads the manual

You were given all you need. Show some initiative.

but if you absolutely refuse to learn anything, then here and learn from this:

sudo apt-get remove virtualbox-2.2.4-47978

 Then isntall the new version as described above.

From: Anonymous

Thanks a million. This install worked perfectly on my machine. I uninstalled version 2.1.4 and installed 3.0. My virtual xp settings remained in tact.

From: Lillie Bennett

start synaptic, search virtualbox, right click the entry, select mark for upgrade and apply an old timer would have to say, "This is just too easy!" Lillie

From: kasthuriarachchi

thanks a lot, wel done!

From: Anonymous

You misunderstand what I'm saying.  I need to know how to do it.  A walk through like the above tutorial.  Uninstall / reinstall doesn't mean jack to me on Linux.  What commands, etc..?

From: Anonymous

wow i just can't believe how rude people can be...can somebody out there breathe for me... 

From: Woody

Hi I removed Virtualbox 2.2 using synaptic , followed this how to and now I get this error in /var/log/vbox-install.log:

Error! Your kernel source for kernel 2.6.27-11-generic cannot be found at
/lib/modules/2.6.27-11-generic/build or /lib/modules/2.6.27-11-generic/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:150: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
Makefile:158: *** Error: /usr/src/linux (version 2.6.24-19-generic) does not match the current kernel (version 2.6.27-11-generic).  Stop.


Can anyone help with this error??

From: Pascal Gautherot

I suppose you must install linux-headears

For me :

uname -a

Linux necM350 2.6.31-19-generic-pae #56-Ubuntu SMP Thu Jan 28 02:29:51 UTC 2010 i686 GNU/Linux

So I do :

apt-get install linux-headers-2.6.31-19-generic-pae

After you can do this :

/etc/init.d/vboxdrv setup


From: Anonymous

I installed VB3.0 but had to go back, it turns out that shared folders have a problem with xp guests on linux host. They are write-once. A File saved into a shared folder is saved with a Read-Only permission. VB is aware of this and apparently has a fix in the SVN (see but the current .deb is still broken.

From: Woody

I found the solution to my issue here:

For some reason the latest kernel update 2-6-28-13 did not reflect in an updated menu.lst file in the /boot/grub directory. 


Once I updated menu.lst and resterted, the virtualbox kernel module compiled just fine. 


From: Ron

I had the same problem, but the solution described is not available because of a bad URL.



From: Miller

Perfect step-by-step instructions. Thank you for taking the time to show us another way of getting this done.

From: Steve

Just starting out Linux/Ubuntu OS, found your tutorial's step by step guide a great help. Quickly installed no messing.


 Kind Regards


 Rated 10/10

From: ld

I just wanted to thank you for this clear set of instructions for installing VirtualBox non-OSE version. I installed the latest 3.0.12 version into Ubuntu 9.10 without issues. Thanks again!

From: patzeltb

Works also fine on Karmic (Ubuntu 9.10). Just replace the jaunty in the deb-line for /etc/apt/sources.list with karmic and the result will be also a working VirtualBox 3.0. Thanks for the tutorial.

From: Mike Hankey

Having very little experience with Ubuntu I followed your instructions and had no problems.



From: Anonymous

Really useful topic, thanks.

From: Anonymous

Thank you so much for this. You are wonderful

From: Kaguius

This is wonderful, clear and consise instructions. Marvelous, just marvelous.

From: GGurgel

So good... works in ubuntu 10.04 too !

Congrats ....

From: Moses

Thanks so much. Pretty simple and fast.

From: Anonymous

stop working to 2%

From: Yared

works in Ubuntu 10.04