Monthly Archives: May 2013

VirtualBox fixed after a new Linux kernel

Every time Ubuntu updates installs a new Linux kernel, your VirtualBox is likely to be broken. I got these error when starting my virtual machine:

The virtual machine 'xxx' has terminated unexpectedly during startup with exit code 1.

and

Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

This is how I can solve it:

sudo apt-get remove virtualbox-dkms
sudo apt-get install linux-headers-`uname -r`
sudo apt-get install virtualbox-dkms

Tested on Ubuntu 13.04 with VirtualBox 4.2.10. Hope this keeps on working!