Ubuntu – Kernel Update *breaks* Oracle Virtual Box frequently – How to avoid this

kernelupdatesvirtualbox

I'm using Desktop 12.04. I run Windows XP for testing Lazarus and the guest OS is on Virtual Box.

Every few times a month, the Ubuntu update causes the Virtual Box to stop working. i.e., when I run the virtual box, it insists that I recompile some kernel module. Well, it's no big deal, but is there a way to avoid this? Can't it be automated or not stop working?

This development machine hardly shuts off and having to reboot the guest OS means a lot of time wasted because there are so many files/sessions open.

Thanks!

Best Answer

VirtualBox User Manual, "The VirtualBox kernel module":

If DKMS is available and installed, the VirtualBox kernel module should always work automatically, and it will be automatically rebuilt if your host kernel is updated.

If DKMS is not already installed, execute one of the following:
On an Ubuntu system:
sudo apt-get install dkms

Otherwise, there are only two situations in which you will need to worry about the kernel module: (...)

  • The kernel of your Linux host was updated and DKMS is not installed. In that case, the kernel module will need to be reinstalled by executing (as root):

    /etc/init.d/vboxdrv setup