How To Install VirtualBox Open Source Edition on Ubuntu 7.10

By | 2007/10/12

UPDATE: Install VirtualBox on Ubuntu 9.10 “Karmic Koala”

This tutorial has Jeff Schroeder and Aaron Toponce to thank for their tips and prodding to try VirtualBox again. Thanks guys… now if one of us can just document simpler proper network bridging we’d be in good shape!

I’ve previously written on how to install VMware Server on Ubuntu 7.10, install VMware Server on Ubuntu 7.04 and install VMware Tools, but installing VirtualBox has a few of its own benefits. One, it is actually Open Source / Free Software whereas VMware is freeware. This is very important to a lot of people, myself included. When possible I prefer to run the “Free Stuff” vs the lock-in, trade-secrets, we-don’t-get-how-open-source-can-save-us stuff. VirtualBox will do that for us. It has also been found that VirtualBox can be faster than VMware Server in many cases. I haven’t done any direct side-by-side comparisons, but many of the articles that I have read refer to this. If anyone is able to do some direct testing I would be interested in hearing about it.

Installing VirtualBox Open Source Edition

Update: If you are running the final release of Ubuntu 7.10 “Gutsy Gibbon” you can cut down these steps as a pack of the modules are already built.  Use the following:

sudo aptitude install virtualbox-ose virtualbox-ose-modules-generic

You can now skip to step #3 below.

One of the benefits of running the Open Source Edition is that we get to compile it for our machines. This should lead to a bit better performance and, again, we’ll be rid of the binary blobs. We’ll need to install the following:

sudo aptitude install virtualbox-ose build-essential linux-headers-generic

We’ll then use module-assistant to prepare the kernel modules for our Virtualbox installation:

  1. sudo m-a prepare
  2. sudo m-a a-i virtualbox-ose
  3. sudo usermod -G vboxusers -a username (your username)
  4. sudo chmod 666 /dev/vboxdrv (this is only done to avoid a logout/login for the group-change to take effect)

You are now ready to launch VirtualBox. You can launch it from the command line using the virtualbox command.

I will be writing a few follow-up posts on configuring bridged networking and guest-additions for better performance within the guests.

If you’re not familiar, currently the NAT setup in VirtualBox means that your guest machines can get out, but nothing else can connect in. To use this viably for any type of guest-based-server we need bridging. I’ll be hacking together some steps for that soon.

13 thoughts on “How To Install VirtualBox Open Source Edition on Ubuntu 7.10

  1. Alpha_Cluster

    Actually virtualbox in the repos now installs virtualbox-ose-modules-2.6.22-14-generic.
    You can just follow with a modprobe for vboxdrv and then adding user to the group and chmoding the /dev folder.

  2. Roger Sanders

    I use both VMware and VirtualBox in Kubuntu. I have Windows XP Profressional running in VMware and Windows 2000 in VirtualBox as well as SuSE. Generally, I suspend each machine when not in use. Upon resuming the VMs, it can take the VMware installation of XP almost a minute to fully resume. The VB Wndows 2000 fully resumes in a few seconds. I use bridged networking in all my VMs and have experimented activating the various features such as USB support and serial support. I have found VMware better with the serial support than VB and both about the same with USB support.

    For those who like to place icons on the desktop for the various VMs rather than going through the progam interface, I found a minor change in the command for VirtualBox vs. VirtualBox OSE: the VBoxMange should be replaced with vboxmanage—note all lower case. My VMware commands remained the same in Kubuntu 7.10 as they were in 7.04 even though I did have to recompile VMware for 7.10 as I did for using VB OSE.

    With regards to host networking, VMware very easily handles this. To use host networking VB, I recommend the site I used for Kubuntu 7.04. Just locate the host networking section.
    http://www.bluetwanger.de/blog/

  3. Pingback: Installing Guest Additions For Ubuntu Guests in VirtualBox : Ubuntu Tutorials : Dapper - Edgy - Feisty - Gutsy

  4. aspir8or

    Ok, I’m lost. How do I modprobe vnboxdrv? Never added modules to the kernel before. sudo m-a a-i virtualbox-ose closes with error
    Setting up virtualbox-ose-modules-2.6.22-14-generic (1.5.0-dfsg2-1ubuntu1+2.6.22-14.43) …
    FATAL: Error inserting vboxdrv (/lib/modules/2.6.22-14-generic/misc/vboxdrv.ko): Invalid argument
    * Reloading kernel event manager…

    Alpha_Cluster suggest modprobe, but I’ve never added modules to a kernel before, how do I do that?

    No hurry. I’ll check back in a month when I get out of hospital. Going in today for spine surgery.

    Cheers.

  5. Todd

    Thanks for the clear, easy-to-understand guide! I had trouble installing VirtualBox with Synaptic Package Manager GUI, but your instructions quickly solved the problem. Will look forward to reading more useful information…

  6. Roy

    I’m new to Linux. Please help.

    Followed your instructions and got the following error when running
    sudo m-a a-i virtualbox-ose

    Onscreen message:
    Updated infos about 1 packages
    Getting source for kernel version: 2.6.22-14-server
    Kernel headers available in /usr/src/linux-headers-2.6.22-14-server
    Creating symlink…
    apt-get install build-essential
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    build-essential is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    Done!
    unpack
    Extracting the package tarball, /usr/src/virtualbox-ose.tar.bz2, please wait…
    Target package file /usr/src/virtualbox-ose-modules-2.6.22-14-server_1.5.0-dfsg2-1ubuntu3+2.6.22-14.46_i386.deb already exists, not
    rebuilding!
    (however, you could use the -f switch to ignore it)
    dpkg -Ei /usr/src/virtualbox-ose-modules-2.6.22-14-server_1.5.0-dfsg2-1ubuntu3+2.6.22-14.46_i386.deb
    dpkg: regarding …/virtualbox-ose-modules-2.6.22-14-server_1.5.0-dfsg2-1ubuntu3+2.6.22-14.46_i386.deb containing virtualbox-ose-modules-2.6.22-14-server:
    virtualbox-ose-modules-2.6.22-14-server conflicts with virtualbox-ose-modules
    virtualbox-ose-modules-2.6.22-14-generic provides virtualbox-ose-modules and is present and installed.
    dpkg: error processing /usr/src/virtualbox-ose-modules-2.6.22-14-server_1.5.0-dfsg2-1ubuntu3+2.6.22-14.46_i386.deb (–install):
    conflicting packages – not installing virtualbox-ose-modules-2.6.22-14-server
    Errors were encountered while processing:
    /usr/src/virtualbox-ose-modules-2.6.22-14-server_1.5.0-dfsg2-1ubuntu3+2.6.22-14.46_i386.deb

    I: Direct installation failed, trying to post-install the dependencies

    apt-get -f install
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  7. Pete

    Why am I getting this error?

    pr@home:~/Desktop$ sudo m-a a-i virtualbox-ose
    sudo: m-a: command not found
    pr@home:~/Desktop$

  8. LiNuts

    Maaaan, this is one of the best Vbox tutorials out there! Geez, I’d tried it the first time and worked by the book. Then a few weeks after that I had to reinstall Ubuntu(nothing to do with Vbox, though…)and then I couldn’t find this page again. Will never happen again! I’m just bookmarking it! ;D

  9. Johnny

    Havo no /dev/vboxdrv folder…?

  10. peter

    This is about the 10th ‘how to install virtualbox on gutsy’ tutorial I’ve recently read. None of them work 🙁
    I guess virtualbox should have a correct install script, otherwise newbies might think it’s a pile of shit.
    Shame on Sun.

  11. Derek

    It is a shame that virtualbox is so tricky. The first time I installed it, everything worked fine. A few months later my HDD died on me, forcing a reinstall of everything on a new drive.

    Installed Ubuntu etc…, then got to reinstalling Virtualbox. Completely buggered up the OS after install. I had to reformat and start again.

    Now, after installing through the package manager I have kernal not loaded problems once again.

    Pity.

  12. Aida Philips

    when i start to install virtual box on my computer i receive a message that the software is no compatible with the window logo. I need your help to install this software or recommend me an other that passed the windows xp logo.

    Many thanks for your help

Comments are closed.