Category: Virtualization


If you attempt to (re)?install Virtualbox OSE 3.2.8 from the official Oracle package, you may encounter the following errrors within the installation log file /var/log/vbox-install.log :

root@localhost:~# dpkg-reconfigure virtualbox-3.2
Stopping VirtualBox kernel module:done..
addgroup: The group `vboxusers’ already exists as a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Starting VirtualBox kernel module:
modprobe vboxdrv failed. Please use ‘dmesg’ to find out why failed!

cat /var/log/vbox-install.log
** Compiling vboxdrv
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxdrv/3.2.8/source ->
/usr/src/vboxdrv-3.2.8

DKMS: add Completed.

Error! Your kernel headers for kernel 2.6.32-bpo.2-686 cannot be found at
/lib/modules/2.6.32-bpo.2-686/build or /lib/modules/2.6.32-bpo.2-686/source.
You can use the –kernelsourcedir option to tell DKMS where it’s located, or you could install the linux-headers-2.6.32-bpo.2-686 package.
Failed to install using DKMS, attempting to install without
Makefile:162: 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:170: *** Error: /usr/src/linux (version 2.6.30-bpo.2-686) does not match the current kernel (version 2.6.32-bpo.2-686).  Stop.

What do the errors above mean? The installation has been tested on a Debian lenny machine with the backports activated in /etc/apt/sources.list.

The running kernel version : 2.6.32-bpo.5-686

To compile a module with DKMS , you need to install the following (and probably missing ones for those who got the errors displayed above ) Debian packages :

root@localhost:~# apt-get install linux-image-2.6.32-bpo.5-686 linux-headers-2.6.32-bpo.5-686

These packages contains the source code and the corresponding headers files for the current running kernel. Once installed, relaunch your installation :

root@localhost:~# dpkg-reconfigure virtualbox-3.2

Stopping VirtualBox kernel module:done..
addgroup: The group `vboxusers’ already exists as a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
Starting VirtualBox kernel module:done..

The freshly compiled modules should have been loaded :

root@localhost:~# lsmod | grep vbox
vboxnetadp              5126  0
vboxnetflt             12641  0
vboxdrv               126550  2 vboxnetadp,vboxnetflt

Even if the compilation process has been a success, do not forget to check /var/log/vbox-install.log

Virtualbox OSE 3.2.8 is available from the Oracle official repository. There are two ways to install it.

First method : download the appropriate package according to your Linux distribution. For Debian lenny (i386) : Download here Virtualbox OSE 3.2.8

Then, install it as root :

root@localhost:~# dpkg -virtualbox-3.2_3.2.8-64453~Debian~lenny_i386.deb

Beforehand, make sure that any previous Virtualbox OSE installation has been properly removed.

Second method : download and install the package with the apt-get tool.

Please follow the steps below to perform a successful installation :

root@localhost:~# echo “deb http://download.virtualbox.org/virtualbox/debian lenny non-free” >> /etc/apt/sources.list

root@localhost:~# wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

root@localhost:~# apt-get update && apt-get install virtualbox-3.2

DKMS is used in the installation methods described above to compile the needed modules to make Virtualbox run out of the box. Make sure it is installed on your system.

For a more detailed installation, please visit the official Virtualbox installation website :
http://www.virtualbox.org/wiki/Linux_Downloads

If you are running Debian Lenny, the best way to install Virtualbox OSE is to use the version available in the Debian backports. For those who have installed the previous release (3.0.12), please check the availability before updating :

root@localhost:~# apt-cache policy virtualbox-ose

3.2.4-dfsg-1~bpo50+1 0
1 http://www.backports.org lenny-backports/main Packages
*** 3.0.12-dfsg-1~bpo50+1 0
100 /var/lib/dpkg/status
1.6.6-dfsg-3 0
500 http://ftp.fr.debian.org lenny/main Packages

To update :

root@localhost:~# apt-get -t lenny-backports install virtualbox-ose

The dependencies will be upgraded : virtualbox-ose-qt, virtualbox-ose-dkms

More information :

http://packages.debian.org/lenny-backports/virtualbox-ose

Oracle has released a new version of VirtualBox : 3.1.8.
You can download it at the following address : Download VirtualBox 3.1.8 for Debian 5.0
To see the changelog for this release : VirtualBox Changelog

After a fresh installation of Debian Lenny, I wanted to use a quite very recent version of VirtualBox.
One solution is the Debian backports : Here are the VirtualBox packages available
To make VirtualBox work well, you need to install the following packages : virtualbox-ose, virtualbox-ose-qt and virtualbox-ose-source

Here are the version(s) available for each package mentioned above :

virtualbox-ose : 3.0.12-dfsg-1~bpo50+1 (for i386)
virtualbox-ose-qt : 3.0.12-dfsg-1~bpo50+1 (for i386)
virtualbox-ose-source : 3.1.4-dfsg-1~bpo50+1 (for all platforms)

As you may have noticed, virtualbox-ose-source version is higher than the ones above. As a test, I installed all of them. I compiled the modules needed with module-assistant. I failed to launch a virtual machine.
Here is the message I got :

VBoxHeadless: Error -1912 in supR3HardenedMainInitRuntime!
VBoxHeadless: RTR3Init failed with rc=-1912

Running as a normal user the command vboxheadless, I encountered the same message :

fool@localhost:~$ vboxheadless

VBoxHeadless: Error -1912 in supR3HardenedMainInitRuntime!
VBoxHeadless: RTR3Init failed with rc=-1912

VBoxHeadless: Tip! It may help to reinstall VirtualBox.

The only workaround I found for this problem is to install the Sun’s package available here .
To install it :

root@localhost:~# dpkg -i virtualbox-3.1_3.1.4-57640_Debian_lenny_i386.deb

Make sure that the good modules are loaded correctly :

root@localhost:~# lsmod |grep vbox

vboxnetadp              6436  0
vboxnetflt             12332  0
vboxdrv               155144  2 vboxnetadp,vboxnetflt

As a last test, run the following command :

root@localhost:~# /usr/bin/VBoxHeadless

You should have the message below :

Sun VirtualBox Headless Interface 3.1.4
(C) 2008-2010 Sun Microsystems, Inc.
All rights reserved.

Usage:
-s, -startvm, –startvm <name|uuid>   Start given VM (required argument)
-v, -vrdp, –vrdp on|off|config       Enable (default) or disable the VRDP
server or don’t change the setting
-p, -vrdpport, –vrdpport <ports>     Comma-separated list of ports the VRDP
server can bind to. Use a dash between
two port numbers to specify a range
-a, -vrdpaddress, –vrdpaddress <ip>  Interface IP the VRDP will bind to
-c, -capture, –capture               Record the VM screen output to a file
-w, –width                           Frame width when recording
-h, –height                          Frame height when recording
-r, –bitrate                         Recording bit rate when recording
-f, –filename                        File name when recording.  The codec
used will be chosen based on the
file extension

A similar problem is registered in the Debian bug tracking system :
Here is another solution to install a very recent version of VirtualBox :

I have recently installed the lastest kernel version from the testing Debian repositories : 2.6.32-1-686
Once downloaded, I must recompile some modules, particularly Virtualbox modules.

root@localhost:~# dpkg-reconfigure virtualbox-ose-dkms
Removing all DKMS Modules
Done.
Loading new virtualbox-ose-3.1.2 DKMS files…
Building for 2.6.32-1-686 and 2.6.32-trunk-686
Building initial module for 2.6.32-1-686

Error! Bad return status for module build on kernel: 2.6.32-1-686 (i686)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.1.2/build/ for more information.

The error message is within the log file /var/lib/dkms/virtualbox-ose/3.1.2/build/make.log

root@localhost:~# cat /var/lib/dkms/virtualbox-ose/3.1.2/build/make.log

DKMS make.log for virtualbox-ose-3.1.2 for kernel 2.6.32-1-686 (i686)

LD      /var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/built-in.o
CC [M]  /var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/linux/SUPDrv-linux.o
Can’t open perl script “/usr/src/linux-headers-2.6.32-1-common/scripts/recordmcount.pl”:
make[4]: *** [/var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv/linux/SUPDrv-linux.o] Erreur 2
make[3]: *** [/var/lib/dkms/virtualbox-ose/3.1.2/build/vboxdrv] Erreur 2
make[2]: *** [_module_/var/lib/dkms/virtualbox-ose/3.1.2/build] Erreur 2

Here is a workaround to get the missing file :

root@localhost:~# apt-get source linux-kbuild-2.6.32

then

root@localhost:~# cd /root/linux-kbuild-2.6-2.6.32/kbuild/scripts && cp recordmcount.pl /usr/src/linux-headers-2.6.32-1-common/scripts/

I reconfigure the package virtualbox-ose-dkms :

root@localhost:~# dpkg-reconfigure virtualbox-ose-dkms

Removing all DKMS Modules
Done.
Loading new virtualbox-ose-3.1.2 DKMS files…
Building for 2.6.32-1-686 and 2.6.32-trunk-686
Building initial module for 2.6.32-1-686
Done.

vboxdrv.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-1-686/updates/dkms/

depmod…………….

DKMS: install Completed.
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.

fool@localhost:~$lsmod |grep vbox

vboxnetflt             10854  0
vboxnetadp              5366  0
vboxdrv               117917  2 vboxnetflt,vboxnetadp

This compilation problem has already been encountered :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562512

A new release of VirtualBox is available in the Debian testing repositories.
If already installed on your system, it will be automatically upgraded if you are using Debian testing.
Unfortunately, some errors occurred concerning the modules used by VirtualBox.
During the upgrade, the modules of the previous version are not removed correctly.
The package, virtualbox-ose-dkms, is not installed because the new release seems to use the previous modules.
I failed to launch the VirtualBox application. Here is the error message I got :

RTR3Init failed with rc=-1912 (rc=-1912)
Please install the virtualbox-ose-dkms package and execute ‘modprobe vboxdrv’ as root.

So, I installed the package virtualbox-ose-dkms :

root@localhost:~# apt-get install virtualbox-ose-dkms

The installation did not complete correctly :

DKMS: install Completed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modulesmodprobe vboxnetflt failed. Please use ‘dmesg’ to find out why … failed!
failed!
invoke-rc.d: initscript virtualbox-ose, action “restart” failed.

It took me some time to find out what was wrong exactly. I got a first clue after checking if the vbox* modules were still loaded. There were still remaining :

root@localhost:~# lsmod |grep vbox
 vboxnetadp             65312  0
 vboxnetflt             70648  0
 vboxdrv               100992  1 vboxnetflt

In the previous version, they could be found in this repository :
/lib/modules/2.6.30-2-686/updates/dkms/

After seeking for the timestamp of the DKMS repository, I unloaded the vbox* modules and I deleted the DKMS repository contents.

root@localhost:~# modprobe -r vboxnetadp
root@localhost:~# modprobe -r vboxnetflt
root@localhost:~# modprobe -r vboxdrv
root@localhost:~# cd /lib/modules/2.6.30-2-686/updates && rm -Rf dkms

Then, I relaunch a “dpkg-reconfigure” process :

root@localhost:~#dpkg-reconfigure virtualbox-ose-dkms
DKMS: install Completed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.

root@localhost:~#lsmod |grep vbox
vboxnetflt             12660  0  
vboxnetadp              6652  0  
vboxdrv               157000  2 vboxnetflt,vboxnetadp

root@localhost:~#modinfo vboxnetflt
filename:       /lib/modules/2.6.30-2-686/misc/vboxnetflt.ko
version:        3.1.2_OSE ((0xA2CDe001U))
license:        GPL
description:    VirtualBox Network Filter Driver
author:         Sun Microsystems, Inc.
srcversion:     AC748926D77F3C073851FAD
depends:        vboxdrv
vermagic:       2.6.30-2-686 SMP mod_unload modversions 686

The new modules are located in the /lib/modules/2.6.30-2-686/misc repository.

In order to use the latest version of VirtualBox (3.0.12) available in Debian testing repositories, you have to install the following packages :

root@localhost:~# apt-get install virtualbox-ose virtualbox-ose-qt virtualbox-ose-source
the package virtualbox-ose-source contains the sources for the modules to be compiled and to be included into the current kernel.

Nevertheless, it is possible that these modules are not compiled for the  kernel currently running.

With Debian, it is possible to relaunch manually the configuration of a package :

root@localhost:~# dpkg-reconfigure virtualbox-ose-source

Here is the output :

Removing all DKMS Modules
Done.
Adding modules to DKMS build system
Doing initial module builds

I got this error :

Error! Your kernel headers for kernel 2.6.30-2-686 cannot be found at
/lib/modules/2.6.30-2-686/build or /lib/modules/2.6.30-2-686/source.
Installing initial modules.

In order to solve this problem, you have to install linux-headers-2.6.30-2-686 :

root@localhost:~# apt-get install linux-headers-2.6.30-2-686

Run again the command below :

root@localhost:~# dpkg-reconfigure virtualbox-ose-source

Removing all DKMS Modules
Done.
Adding modules to DKMS build system
Doing initial module builds
Installing initial modules
Done.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.

There is no more problem with the modules.

You can check that there are here :

fool@localhost:~$ lsmod |grep vbox

vboxnetflt             70648    0
vboxnetadp           65312    0
vboxdrv               100992      1          vboxnetflt

Follow

Get every new post delivered to your Inbox.