Took me a long time to solve this issue. Had this problem with vBox across 2 distros (Ubuntu and Arch).
I had dkms and all the modules already installed and compiled into my kernel, yet I still got a module related error message when I tried to run a vBox virtual machine.
If your vBox GUI starts without a hitch but get an error telling to install the VBoxDrv kernel module when you try to run a virtual machine, your problems are not related to installing the modules into your kernel but ACTIVATING THEM in modprobe which the module installation script fails to do.
To load a module manually (such as vboxdrv in your case), open a terminal prompt and put in :
sudo modprobe vboxdrv
If you Virtual Machine runs after that without giving you an error message, then you can activate the vboxdrv module permanently by going to /etc/modules-load.d/
and making a .conf
file (such as vbox.conf
). In the .conf
file the names of the vbox kernel modules you want to add, such as: vboxdrv
.
Save and reboot
You can also ad these optional modules: vboxnetadp
, vboxnetflt
and vboxpci
From Vbox's wiki:
vboxnetadp
and vboxnetflt
are both needed when you intend to use the "Host-only networking" feature. More precisely, vboxnetadp is needed to create the host interface in the VirtualBox global preferences, and vboxnetflt is needed to launch a virtual machine using that network interface.
vboxpci is needed when your virtual machine needs to pass through a PCI device on your host.
Note: If the VirtualBox kernel modules were loaded in the kernel while you updated the modules, you need to reload them manually to use the new updated version. To do it, run vboxreload as root.
modprobe -a vboxdrv
as root