OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services high common DISPUTE

Fix VirtualBox "Kernel driver not installed (rc=-1908)" after a kernel update

archendeavouroscachyosmanjarovirtualboxdesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The failure mode, vboxreload (really shipped at /usr/bin/vboxreload by the virtualbox package), the vboxnetadp/vboxnetflt modules, the vboxusers group and the module-signing note are all correct. The problem is the headline command: virtualbox-host-modules-arch no longer exists in the Arch repositories. A search of the current repos returns virtualbox, virtualbox-host-dkms, virtualbox-guest-*, virtualbox-ext-vnc, virtualbox-sdk and nothing named *-modules-arch. sudo pacman -S virtualbox virtualbox-host-modules-arch therefore fails with 'target not found', which is a bad first line for a record whose whole point is a missing module.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Mixing virtualbox-host-modules-arch (built for the stock linux kernel) with a different kernel is exactly what causes this. Don't install both module packages. Rebuilding DKMS modules requires the matching *-headers package. Installing a new kernel without its headers reproduces the failure on the next boot.

Symptom

After a system update and reboot, starting any VM in VirtualBox pops:


Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly.

Cause

The vboxdrv kernel module is not loaded for the running kernel: the DKMS module was not (re)built for it, the matching *-headers package is missing, or you booted a new kernel while the previous modules were still loaded. VirtualBox on Arch is now DKMS-only, and there is no prebuilt virtualbox-host-modules-arch package any more, so every kernel update depends on DKMS succeeding.

Fix

Install VirtualBox with the DKMS modules and the headers for whichever kernel(s) you boot:


sudo pacman -S virtualbox virtualbox-host-dkms linux-headers
# add the matching headers for any other kernel you boot:
# linux-lts-headers / linux-zen-headers / linux-cachyos-headers ...

Then confirm the build and load it:


dkms status
sudo modprobe vboxdrv
sudo vboxreload                      # after updating modules under a running set
sudo modprobe vboxnetadp vboxnetflt  # bridged/host-only networking
sudo usermod -aG vboxusers $USER     # USB passthrough; log out/in afterwards

The Required key not available / CONFIG_MODULE_SIG_FORCE note and the 'install headers for every kernel you keep' warning stand as written. The warning about mixing module packages can go, since only the DKMS package remains.

Verify

lsmod | grep vbox lists vboxdrv (and vboxnetflt/vboxnetadp if you loaded them), and the VM starts. dkms status shows the module built for your running kernel.

Sources

virtualbox-kernel-driver-not-installed