How to solve "The installed support driver doesn't match the version of the user" issue in VirtualBox so an instance can be booted again?

Solution 1:

To remove virtualbox, run:

sudo apt autoremove --purge virtualbox*

Now make sure there is no other version installed on your system by:

dpkg -l virtualbox* | grep ^i

You shouldn't get any output.

Then remove all related PPAs from your sources.list and sources.list.ddirectory. ex:

mkdir ~/apt-tmp
sudo mv /etc/apt/sources.list.d/* ~/apt-tmp

Make sure there is nothing except official repositories sources in

/etc/sources.list.

And update your sources:

sudo apt update

Now we can search to see which versions are available to install:

apt-cache madison virtualbox | grep -iv sources

Which produces an output like this:

virtualbox | 5.1.38-dfsg-0ubuntu1.16.04.1 | http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages

virtualbox | 5.0.18-dfsg-2build1 | http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages

Then install the lastest version mentioned above:

sudo apt install virtualbox=5.1.38-dfsg-0ubuntu1.16.04.1

Also sudo apt install virtualbox, would be fine, but I would go with the former command to make sure my desired version is going to be installed.

And after all, check that the correct version is installed.

From command line:

dpkg -l virtualbox* | grep ^i

which will output:

ii  virtualbox                     5.1.38-dfsg-0ubuntu1.16.04.1 amd64        x86 
virtualization solution - base binaries
ii  virtualbox-dkms                5.1.38-dfsg-0ubuntu1.16.04.1 all          x86 
virtualization solution - kernel module sources for dkms
ii  virtualbox-qt                  5.1.38-dfsg-0ubuntu1.16.04.1 amd64        x86 
virtualization solution - Qt based user interface

Then also you can run:

sudo apt upgrade

Just in case.

Solution 2:

On Windows, I finally succeeded to resolve this issue.

  1. Uninstall VirtualBox using the control panel "Program and functionalities" tool. DO NOT RESTART YET
  2. Manually check for the following folders and remove them if they are still there:
    • C:\Program Files\Oracle\VirtualBox
    • C:\Program Files (x86)\Oracle\VirtualBox

NOTE: the folders can be in a different place depending where you installed Oracle VirtualBox (make sure to check the correct folder in case you changed the installation directory).

  1. Go to %userprofile% directory (eg: C:\users\me) and delete the following folders (don't forget to backup those files if you want to try re-importing your VMs later):

    • .VirtualBox
    • VirtualBox VMs
  2. Go to regedit (WIN+R and type regedit) and click on Computer at the very top.

    • Then click on "Edit > Search" or hit CTRL+F. Type virtualbox and tick all checkboxes.
    • Find the key Oracle > VirtualBox. It should be in Computer\HKEY_CURRENT_USER\SOFTWARE\Oracle\VirtualBox. Remove VirtualBox key.
  3. IMPORTANT: RESTART NOW. Restart your computer !

  4. Install VirtualBox and Enjoy !

Solution 3:

Linux was not mentioned in the question, but my question was verbatim in VirtualBox 5.2 issue is happening for me in Ubuntu 16.04. Similarly, uninstall reinstall with the correct files resulted in the same error message. The problem was similar to the Windows issue, but in my case dkms was holding some older modules that were in conflict with the latest Virtual Box version.

The solution for me (change for your versions):

sudo apt-get purge virtualbox-5.2
sudo dpkg -P virtualbox-5.2
sudo apt-get autoremove 

I included the apt-get purge just in case you installed from apt-get while troubleshooting another problem.

At the autoremove command, you should see dkms updates removing several older virtualbox version modules. Aha, a reference to the source of our problem, wrong module version per the virtualbox error...:

vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-112-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 5.0.40
completely from the DKMS tree.
------------------------------

Reboot for good measure

sudo reboot now

Then, download and install the matching versions of virtualbox and extensions (update for your current version): https://www.virtualbox.org/wiki/Linux_Downloads

sudo dpkg -i ~/Downloads/virtualbox-5.2_5.2.6-120293~Ubuntu~xenial_amd64.deb
sudo VBoxManage extpack install ~/Downloads/Oracle_VM_VirtualBox_Extension_Pack-5.2.6-120293.vbox-extpack

If the first install gives you a libsdll error, try:

sudo apt-get -f install

Hopefully then you should have a working VirtualBox, or progressed to dealing with new errors (VT-X crashes, etc...).

(Please don't flame for being a zombie thread, I got here from a search and the same symptoms. Thought others may have use for this information in the future as well.)