Fix VirtualBox kernel module not found

On upgrading major versions, say from VirtualBox 5.2 to VirtualBox 6.0, you may find you can’t start any of your VM images, getting an error including “kernel modules do not match”. This may mean you haven’t removed all of the old version VirtualBox components. Consider using sudo synaptic or

apt list --installed | grep virtualbox

to see if any old VirtualBox components are installed that may be conflicting with the new VirtualBox version.

Fix

You don’t have to uninstall the new VirtualBox version.

  1. as noted above, remove any components from the old VirtualBox install
  2. reboot the computer to fully flush the old VirtualBox components
  3. install the Extension Pack for the new VirtualBox version.