Installing VirtualBox 3.0 On An Ubuntu 9.04 Desktop

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Tue, 2009-07-07 17:04. :: Ubuntu | VirtualBox | Desktop | Virtualization

Installing VirtualBox 3.0 On An Ubuntu 9.04 Desktop

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 07/07/2009

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 http://download.virtualbox.org/virtualbox/debian jaunty non-free

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

wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -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:

 

Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Yared (not registered) on Fri, 2012-05-11 06:57.
works in Ubuntu 10.04
Submitted by Moses (not registered) on Tue, 2011-05-31 09:12.
Thanks so much. Pretty simple and fast.
Submitted by Anonymous (not registered) on Tue, 2012-02-28 16:00.
stop working to 2%
Submitted by GGurgel (not registered) on Mon, 2010-09-27 15:46.

So good... works in ubuntu 10.04 too !

Congrats ....

Submitted by Kaguius (not registered) on Thu, 2010-05-27 07:52.
This is wonderful, clear and consise instructions. Marvelous, just marvelous.
Submitted by Anonymous (not registered) on Fri, 2010-03-26 23:41.
Thank you so much for this. You are wonderful
Submitted by ld (not registered) on Thu, 2009-11-26 14:02.
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!
Submitted by patzeltb (not registered) on Sat, 2009-11-21 13:07.
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.
Submitted by Mike Hankey (not registered) on Sat, 2009-09-12 16:45.

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

Thanks,

Mike

Submitted by Anonymous (not registered) on Mon, 2009-08-31 10:30.
Really useful topic, thanks.
Submitted by Steve (not registered) on Fri, 2009-07-24 14:24.

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

 Thankyou

 Kind Regards

 Steve

 Rated 10/10

Submitted by Miller (not registered) on Wed, 2009-07-15 10:29.
Perfect step-by-step instructions. Thank you for taking the time to show us another way of getting this done.
Submitted by Anonymous (not registered) on Fri, 2009-07-10 20:32.
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 http://www.virtualbox.org/ticket/4381) but the current .deb is still broken.
Submitted by Anonymous (not registered) on Wed, 2009-07-08 23:30.

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.

 

Submitted by Miroj (not registered) on Fri, 2009-07-10 08:32.

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 http://download.virtualbox.org/virtualbox/debian hardy non-free

Submitted by Woody (not registered) on Mon, 2009-07-13 16:25.

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??

Submitted by Pascal Gautherot (not registered) on Sat, 2010-02-13 11:18.

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

By

Submitted by Woody (not registered) on Tue, 2009-07-14 11:15.

I found the solution to my issue here:

http://forums.virtualbox.org/viewtopic.php?f=7&t=19557&p=86462#p86462

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. 

Enjoy!

Submitted by Ron (not registered) on Thu, 2009-08-06 13:17.

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

Ron 

 

Submitted by Anonymous (not registered) on Sat, 2009-07-11 15:35.
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..?
Submitted by Anonymous (not registered) on Tue, 2009-12-08 06:55.
wow i just can't believe how rude people can be...can somebody out there breathe for me... 
Submitted by Ahmed Kamal (not registered) on Fri, 2009-07-10 16:49.
One would need to install build-essentials in order to be able to compile the kernel module eh?
Submitted by Reads the manual (not registered) on Mon, 2009-07-13 23:54.

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.

Submitted by Anonymous (not registered) on Fri, 2009-08-28 16:17.
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.
Submitted by Lillie Bennett (not registered) on Fri, 2009-09-11 09:07.
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
Submitted by kasthuriarachchi (not registered) on Tue, 2010-08-10 14:06.
thanks a lot, wel done!