Tuesday, 11 March 2014

Ubuntu 12.04 + virtualbox

So a linux VM running in virtualbox crashed. Well, they all crashed.

But when I restarted the server I was hit with a couple of error. The core one was this:

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.
Scary. But, google is my friend. I found this post in an Ubuntu forum:

http://askubuntu.com/questions/205154/virtualbox-etc-init-d-vboxdrv-setup-issue

It was an excellent review of the problem. The steps that worked for me were:

sudo apt-get install linux-headers-`uname -r`
 
My headers were up to date so this was not that important, but should be performed regardless.
 
Then reconfigure dkms and load module:

sudo dpkg-reconfigure virtualbox-dkms  
sudo modprobe vboxdrv
 
This  got me farther but then received another network error which was solved with:
 
sudo modprobe vboxnetflt
 
And now we seem to be back in business.