VirtualBox VM not starting after upgrade

0

After upgrading virtualbox from 4.3 to 5.1 using VB page

Trying to start a virtual machine gets 2 messages, that is clear about a driver version mismatch (VERR_VM_DRIVER_VERSION_MISMATCH) and inviting you to execute /sbin/vboxconfig.

The loaded drivers are not the same version as VirtualBox

$ for i in `lsmod | grep box | cut -f1 -d' '`; do modinfo $i ; echo ; done
filename:       /lib/modules/3.16.0-4-amd64/updates/dkms/vboxpci.ko
version:        4.3.36_Debian <-- should be 5.1.*
[...]

(I encountered this problem and didn't find the solution on the internet so I'm posting it here, hoping it helps.)

lolesque

Posted 2016-08-29T16:01:24.987

Reputation: 191

Answers

0

Don't look for the drivers on internet, /sbin/vboxconfig builds them.

The problem was the old drivers were still present and preferred.

So I removed the old drivers and ran /sbin/vboxconfig again, this time it worked.
sudo mv /lib/modules/3.16.0-4-amd64/updates/dkms/vbox* /tmp
(Moving to /tmp instead of rm just in case)
The directory may vary, I found it in the first command in my question with lsmod then modinfo.

Then sudo /sbin/vboxconfig and it should work

The new drivers are in /lib/modules/3.16.0-4-amd64/misc/

(No need to reboot.)

lolesque

Posted 2016-08-29T16:01:24.987

Reputation: 191