These are specific instructions relating to specific versions of Ubuntu. These should not be necessary when installing Virtualbox on a recent version of Ubuntu.

Hardy server

To install the appropriate kernel modules, you will also need the following command:

sudo apt-get install virtualbox-ose-modules-`uname -r`

This may fail if you are running kernel version 2.6.24-22 or higher (see below).

Kernel modules update

If you have updated your Ubuntu system to the latest kernel, you wil notice there are no modules for the 2.6.24-22 kernel. This is documented in Bug #303199.

You will need to build such modules manually, and do so for every future kernel update in Hardy:

sudo apt-get install virtualbox-ose-source module-assistant
sudo module-assistant auto-install virtualbox-ose-source
sudo /etc/init.d/vboxdrv start

This only needs to be done once for a given kernel version. When the system is rebooted, the changes will persist.

vboxusers group permissions

Add yourself to the vboxusers group. You can add more users by running the command again, replacing $USER with the other username.

sudo adduser $USER vboxusers

You will now have to log out of your desktop session and log back in order to update your group membership. Congratulations, you can now skip down to "Using Virtual Box" (which might be out of date?)

If you have a multi-core CPU and experience high CPU usage even when the guest OS is almost no using CPU, you can force Virtual Box to execute in just one of your cores by launching it through taskset.

sudo apt-get install util-linux
taskset -c 1 virtualbox

See http://www.virtualbox.org/ticket/1233 and http://ubuntuforums.org/showthread.php?t=775503 for further info on this issue.

NOTE: If you are using SCIM, you may run into a problem where VirtualBox does not respond to the Host Key and you get stuck. The solution is to install a package:

sudo apt-get install scim-bridge-client-qt

Open Source Edition on Ubuntu 7.10 (Gutsy Gibbon)

Installing VirtualBox OSE on Gutsy Gibbon is much easier. From a terminal session run the following commands to install Virtualbox OSE and build and install the kernel modules.

sudo apt-get install virtualbox-ose virtualbox-ose-source
sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant unpack virtualbox-ose
sudo module-assistant auto-install virtualbox-ose

Now you can verify that the kernel module is installed, but if you didn't receive any errors on the previous steps you're probably fine.

From a terminal:

$ ls -l /dev/vboxdrv
crw-rw---- 1 root vboxusers 10, 62 2007-10-08 13:27 /dev/vboxdrv

If the group is not set to vboxusers, reload the kernel module:

sudo rmmod vboxdrv
sudo modprobe vboxdrv

Add yourself to the vboxusers group. You can add more usernames after "whoami" if you wish.

sudo gpasswd -a `whoami` vboxusers

To automatically load the kernel module (driver) at boot time you need to run the following to append vboxdrv to /etc/modules

echo "vboxdrv" | sudo tee -a /etc/modules

You will now have to log out of your desktop session and log back in order to update your group membership. Congratulations, you can now skip down to "Using Virtual Box"

Dependency problems

In some cases when you execute "sudo module-assistant auto-install virtualbox-ose" dependecy problems appears because virtualbox-ose-modules-2.6.22-14-generic conflicts with virtualbox-ose-modules. You can fix this with the following commands:

sudo apt-get remove virtualbox-ose-modules-2.6.22-14-generic
sudo dpkg -i /usr/src/virtualbox-ose-modules-2.6.22-15-386_1.5.0-dfsg2-1ubuntu3+2.6.22-15.58_i386.deb (filename can change)
sudo apt-get install virtualbox-ose

Perhaps it is not needed but I repeated previous step:

sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant unpack virtualbox-ose
sudo module-assistant auto-install virtualbox-ose

If you are lucky the problem is gone Smile :)

VirtualBox/Previous (last edited 2009-04-19 08:24:17 by waster)