After I reboot one of my VirtualBox host servers today, I was unable to start the virtual box guests. The error was a popular one: NS_ERROR_FAILURE.
The problem was caused by the kernel mismatch problem. All you need is to rebuild the virtual box library to match with your system kernel. In my case, I had the following:
#This is my Virtual Box version 6.0.16 #This is my Linux kernel: uname -a 3.10.0-1062.12.1.el7.x86_64 #This is my virtual box modules version: modinfo vboxdrv filename: /lib/modules/3.10.0-514.10.2.el7.x86_64/weak-updates/vboxdrv.ko.xz version: 5.0.40 r115130 (0x00240000) license: GPL description: Oracle VM VirtualBox Support Driver author: Oracle Corporation retpoline: Y rhelversion: 7.6 srcversion: 3AFDBBC6FDA2CE8CF253D33 depends: vermagic: 3.10.0-957.1.3.el7.x86_64 SMP mod_unload modversions parm: force_async_tsc:force the asynchronous TSC mode (int)
As you can see, the Virtual Box kernel is loaded from a wrong kernel location. Also the Virtual Box is 5.0.40 instead of 6.0.16. In my case, all I need is to rebuild the virtual box library to make it compatible with the Linux kernel. In order to do it, you will need to do the following:
- Remove all the old Linux kernels
- Remove the Virtual Box modules.
- Uninstall the Virtual Box
- Install the Virtual Box
#Remove all of the old kernels: sudo package-cleanup --oldkernels --count=1 -y; #Remove all except your current modules: cd /lib/modules/ #Uninstall the Virtual Box sudo yum remove VirtualBox-6.0 #Reboot sudo reboot #Install the Virtual Box sudo yum install -y VirtualBox-6.0 #Install the Extension Pack (The version number may be different in your case) wget --no-check-certificate https://download.virtualbox.org/virtualbox/6.0.16/Oracle_VM_VirtualBox_Extension_Pack-6.0.16.vbox-extpack sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-6.0.16.vbox-extpack #Start the Virtual Box again
That’s it! Hope it helps!