9

My VirtualBox gave me the following error upon starting a virtual machine:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please install virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

I followed the instruction by installing the DKMS package which gave me the message that it's already installed. Executing

sudo modprobe vboxdrv

resulted in this error:

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.15.0-041500rc2-lowlatency

I tried reinstalling the kernel and virtualbox-dkms with

sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

I got this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of linux-headers-4.15.0-041500rc2-lowlatency is not possible, it cannot be downloaded.
The following additional packages will be installed:
  virtualbox virtualbox-qt
Suggested packages:
  vde2 virtualbox-guest-additions-iso
The following NEW packages will be installed:
  virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 3 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 66.3 kB/22.4 MB of archives.
After this operation, 95.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ch.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dkms all 2.2.0.3-2ubuntu11.5 [66.3 kB]
Fetched 66.3 kB in 0s (477 kB/s)
(Reading database ... 531094 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.5_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11.5) over (2.2.0.3-2ubuntu11.5) ...
Selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../virtualbox-dkms_5.0.40-dfsg-0ubuntu1.16.04.2_all.deb ...
Unpacking virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../virtualbox_5.0.40-dfsg-0ubuntu1.16.04.2_amd64.deb ...
Unpacking virtualbox (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_5.0.40-dfsg-0ubuntu1.16.04.2_amd64.deb ...
Unpacking virtualbox-qt (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Setting up dkms (2.2.0.3-2ubuntu11.5) ...
Setting up virtualbox-dkms (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Loading new virtualbox-5.0.40 DKMS files...
First Installation: checking all kernels...
Building only for 4.15.0-041500rc2-lowlatency
Building initial module for 4.15.0-041500rc2-lowlatency
ERROR (dkms apport): kernel package linux-headers-4.15.0-041500rc2-lowlatency is not supported
Error! Bad return status for module build on kernel: 4.15.0-041500rc2-lowlatency (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.40/build/make.log for more information.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
   Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Die 2018-02-20 20:50:55 CET; 7ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10139 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)

Feb 20 20:50:55 matteo-3 systemd[1]: Starting LSB: VirtualBox Linux kernel .....
Feb 20 20:50:55 matteo-3 virtualbox[10139]:  * Loading VirtualBox kernel mod....
Feb 20 20:50:55 matteo-3 virtualbox[10139]:  * No suitable module for runnin...d
Feb 20 20:50:55 matteo-3 virtualbox[10139]:    ...fail!
Feb 20 20:50:55 matteo-3 systemd[1]: virtualbox.service: Control process ex...=1
Feb 20 20:50:55 matteo-3 systemd[1]: Failed to start LSB: VirtualBox Linux ...e.
Feb 20 20:50:55 matteo-3 systemd[1]: virtualbox.service: Unit entered faile...e.
Feb 20 20:50:55 matteo-3 systemd[1]: virtualbox.service: Failed with result...'.
Hint: Some lines were ellipsized, use -l to show in full.
Setting up virtualbox (5.0.40-dfsg-0ubuntu1.16.04.2) ...
vboxweb.service is a disabled or a static unit, not starting it.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
   Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Die 2018-02-20 20:50:57 CET; 7ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10441 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)

Feb 20 20:50:56 matteo-3 systemd[1]: Starting LSB: VirtualBox Linux kernel .....
Feb 20 20:50:57 matteo-3 virtualbox[10441]:  * Loading VirtualBox kernel mod....
Feb 20 20:50:57 matteo-3 virtualbox[10441]:  * No suitable module for runnin...d
Feb 20 20:50:57 matteo-3 virtualbox[10441]:    ...fail!
Feb 20 20:50:57 matteo-3 systemd[1]: virtualbox.service: Control process ex...=1
Feb 20 20:50:57 matteo-3 systemd[1]: Failed to start LSB: VirtualBox Linux ...e.
Feb 20 20:50:57 matteo-3 systemd[1]: virtualbox.service: Unit entered faile...e.
Feb 20 20:50:57 matteo-3 systemd[1]: virtualbox.service: Failed with result...'.
Hint: Some lines were ellipsized, use -l to show in full.
Setting up virtualbox-qt (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Processing triggers for menu (2.1.47ubuntu1) ...

Of this output, these lines caught my attention:

Building initial module for 4.15.0-041500rc2-lowlatency
ERROR (dkms apport): kernel package linux-headers-4.15.0-041500rc2-lowlatency is not supported
Error! Bad return status for module build on kernel: 4.15.0-041500rc2-lowlatency (x86_64)

Do you have any ideas how to fix my Virtualbox? Is my kernel not supported by VirtualBox? If yes, how can I change to an old/supported one?

5
  • Could you start virtualbox with virtualbox command in the terminal and show us the output? And also, which version of virtualbox are you using?
    – 2017561-1
    Feb 23, 2018 at 18:17
  • WARNING: The character device /dev/vboxdrv does not exist. Please install the virtualbox-dkms package and the appropriate headers, most likely linux-headers-lowlatency. You will not be able to start VMs until this problem is fixed.
    – Mat D.
    Feb 28, 2018 at 17:32
  • I had the same issue this morning. Everything was working fine the day before, but today I got the "kernel error." I spent some time reading and trying different options. After 3 hours, I found this forum: forums.virtualbox.org/viewtopic.php?f=7&t=91833 They mentioned the option of downgrading the kernel. I did that, and Vbox is working. here is how to revert to the previous kernel: karlcode.owtelse.com/blog/2017/03/13/…
    – churta
    Mar 18, 2019 at 16:43
  • I've just posted the solution of this issue here... Dec 30, 2019 at 17:00
  • Does this answer your question? Virtualbox Kernel driver not installed
    – karel
    May 9, 2021 at 4:16

6 Answers 6

11

I had the same problem, after removing versions of kernels I thought were obsolete. But result this in trouble.

I solved that running the following command:

sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms

After that command, virtualbox worked perfectly!

My setup:

  • Ubuntu 16.04 LTS
  • VirtualBox 5.1.38
5
  • Thanks you so much working .
    – balaji
    Jan 21, 2020 at 11:52
  • Worked for me with Ubuntu 20.10 and VirtualBox 6.1.14
    – Janos
    Nov 9, 2020 at 15:46
  • works on Ubuntu 18.04 and virtualbox 5.2
    – rcarba
    Feb 23, 2021 at 15:14
  • Thanks above soln worked in 'Ubuntu 21.04', I had to run extra command 'sudo modprobe vboxdrv'
    – Swapnil
    Aug 10, 2021 at 8:45
  • works for elemetary os as well sadly did not work on ubuntu 20 :(
    – alkanstein
    Nov 27, 2021 at 22:41
5

This is a secure boot issue with ubuntu. You can try this post: https://stegard.net/2016/10/virtualbox-secure-boot-ubuntu-fail/

This uses MOK manager to deal with this.

1
  • On step 3 of the link above where I import the public key, mokutil gives me the following error: EFI variables are not supported on this system
    – Mat D.
    Feb 28, 2018 at 17:31
1

Had recently the same problem on Ubuntu 18.04. Apparently, virtual box 6.+ has some issues with gcc-7. These steps did the job for me:

Removing virtualbox

sudo apt-get purge virtualbox-*

installing gcc-8

sudo apt-get install gcc-8 g++-8

setting default gcc to gcc-8

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

and reinstalling virtualbox with the debian installer did it for me!

1
  • this is helpful. Unfortuantely because it wasn't upvoted I didn't really pay attention to it and had to figure it out the hard way.
    – A.Shoman
    Jun 25, 2020 at 14:10
0

Problem that appear after upgrading kernel to 4.15 version with Virtualbox:

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.15.7-041507-generic

This solved problem for me:

sudo apt-get install virtualbox-dkms linux-headers-lowlatency
0

Actually dont bother your head with tutorials :

Open vm but don't start it, open a terminal and type :

sudo modprobe vboxdrv

and click start on vm.

Enjoy but don't forget to do that everytime you want to use vm especially for Kali. Today's Os doesn't come with dir which is great. So dont bother with headers, uname and update

0

I'm using linux mint mate 20.1 (which is based on ubuntu 20.04), got the issue recently.

Installing headers mentioned by others doesn't work, and it takes several Gb disk.

Background

I've upgraded the kernel once before, but there is no issue in virtualbox for a long time. But suddenly the issue happened.

Solution

The solution that works for me is to use the default kernel when install the system. It can be done by config grub to use the original kernel.

Refer to this: How can I boot with an older kernel version?

e.g

  • sudo vi /etc/default/grub, change to GRUB_DEFAULT=1>2, here:
    • 1 is the index of Advanced options for ubuntu, index start from 0.
    • 2 is the sub index of the default kernel, inside Advanced options for ubuntu.
  • sudo update-grub
  • sudo reboot

Tips

  • You can then optionally remove the kernel installed by hand, which is not used any more.
    In my case it saved me 8Gb space !!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .