If you're using Ubuntu 22.04.4 LTS and faced an issue while hosting virtual machines (VMs) via VirtualBox 6.1.32 with the error message "Kernel driver not installed (rc=-1908)," then this article is for you. Here, we will discuss the possible reasons behind this error message and provide step-by-step solutions to resolve the issue. This article has the following subtitles:
Table of Contents
- Why Kernel Driver Not Installed Error Occurs?
- Checking if VBox Modules Are Loaded
- Installing or Reinstalling VirtualBox Distribution Kernel Modules
- Manually Loading VBox Kernel Modules
- Summary and References
Why Kernel Driver Not Installed Error Occurs?
The error "Kernel driver not installed" message appears when the VirtualBox kernel modules are not properly installed or loaded. These kernel modules allow VirtualBox to interact with the host system's kernel. Without these modules, VirtualBox fails to create, modify, or delete VMs, resulting in the described error message.
Checking if VBox Modules Are Loaded
First, you need to confirm if the VirtualBox kernel modules have been loaded or not.
Using lsmod Command
Execute the following command in your terminal to verify the presence of VirtualBox kernel modules, i.e., vboxnetadp, vboxnetflt, and vboxdrv.
$ lsmod | grep -e vboxnet -e vboxdrv
If these modules are loaded, you'll see output similar to this. If not, proceed to the next section.
vboxnetadp 45056 0
vboxnetflt 69632 1 vboxnetadp
vboxdrv 491520 3 vboxnetflt,vboxnetadp
Installing or Reinstalling VirtualBox Distribution Kernel Modules
If the VirtualBox kernel modules aren't loaded, reinstall the VirtualBox distribution kernel modules using the following commands.
Adding VirtualBox Repository (Optional)
Before proceeding, consider adding the VirtualBox repository to install the latest version. Skip this step if VirtualBox has been installed from the official Ubuntu repository.
$ sudo add-apt-repository -y ppa:virtualbox/virtualbox
$ sudo apt update
Installing or Reinstalling VirtualBox Kernel Modules
Run the following command:
$ sudo apt install --reinstall virtualbox-dkms
The installation process will compile and inject the kernel modules for your running kernel. After completing the process, reboot your system to load the newly compiled modules.
Manually Loading VBox Kernel Modules
If the above step didn't solve the issue, ```bash try loading the VirtualBox kernel modules manually.
Loading vboxdrv
Execute the following command:
$ sudo modprobe vboxdrv
If this command returns an error message, it might be due to DKMS not building or installing the module.
Loading Other Kernel Modules
If vboxdrv loads successfully, load the other two modules:
$ sudo modprobe vboxnetadp
$ sudo modprobe vboxnetflt
Addressing Dependency Errors
If loading any of the modules fails due to dependency errors, investigate and install the missing dependencies before reloading.
Summary and References
We have discussed the reasons behind VirtualBox's "Kernel driver not installed (rc=-1908)" error, how to check for missing kernel modules, and methods to fix the issue. To further pursue the topic, refer to these books, articles, and online resources listed below in HTML unordered list format:
- VirtualBox Manual: VirtualBox and Linux Kernel Module
- VirtualBox and Linux Integration Services Version 5.2.16 User Manual
- Virtualbox error: Kernel driver not installed - Ubuntu 12.4