10

I'm new to Manjaro and AUR, having an almost same problem like this one on Ubuntu:

I have vagrant, virtualbox installed via pacman, then I try

$ vagrant up

VirtualBox is complaining that the kernel module is not loaded. Please run VBoxManage --version or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error.

$ VBoxManage --version

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.9.20-1-MANJARO) or it failed to load. Please recompile the kernel module and install it by

       sudo /sbin/vboxconfig

     You will not be able to start VMs until this problem is fixed.

5.1.20r114628

$ sudo /sbin/vboxconfig

sudo: /sbin/vboxconfig: command not found

According to the link I post, I try $ sudo /usr/lib/virtualbox/vboxdrv.sh setup

sudo: /usr/lib/virtualbox/vboxdrv.sh: command not found

I also find suggestion to modprobe vboxdrv:

$ modprobe vboxdrv

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.9.20-1-MANJARO

$ dkms

Usage: /usr/bin/dkms [action] [options] [action] = { add | remove | build | install | uninstall | match | autoinstall | mkdriverdisk | mktarball | ldtarball | mkrpm | mkkmp | mkdeb | status } [options] = [-m module] [-v module-version] [-k kernel-version] [-a arch] [-d distro] [-c dkms.conf-location] [-q] [--force] [--all] [--templatekernel=kernel] [--directive='cli-directive=cli-value'] [--config=kernel-.config-location] [--archive=tarball-location] [--kernelsourcedir=source-location] [--no-prepare-kernel] [--no-initrd] [--binaries-only] [--source-only] [-r release (SuSE)] [--verbose] [--size] [--spec=specfile] [--media=floppy|iso|tar] [--legacy-postinst=0|1] [--no-depmod] [-j number] Error! No action was specified.

dkms seems alright?

$ dkms status prints nothing.

gcc has been installed .

How do I fix it?

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
Rahn
  • 245
  • 1
  • 4
  • 12

4 Answers4

6

You need to install

sudo pacman -S [kernel version]-virtualbox-host-modules

get kernel version: uname -r

Your user must be in the following groups

  • vboxusers for virtualbox to work
  • storage group (for the usb subsystem)
  • vboxsf group (to share files).
  • uucpgroup for serial port

To add a user to group vboxuser: gpasswd -a USERNAME vboxusers

Check the: manjaro wiki and archlinux wiki

Michael D.
  • 2,820
  • 16
  • 24
1

Rebooting my machine did the trick. This loaded the kernel modules for VirtualBox. I'm sure there is also a way to do this manually, but I didn't bother trying to figure it out when rebooting took less time.

Code-Guru
  • 699
  • 3
  • 6
  • 19
1

I got the same error while starting a Windows7 VM on Arch for the first time after installing VirtualBox.

In my case running sudo modprobe vboxdrv gave no output (though there was no FATAL error as OP faced). Also sudo /sbin/vboxconfig command was not found.

Running rcvboxdrv seemed to do the trick:

$ sudo /sbin/rcvboxdrv
Unloading modules: vboxdrv 
Loading modules: vboxnetadp vboxnetflt vboxpci vboxdrv 

No reboot was required! The VM worked fine after that.

Abhirup Das
  • 111
  • 3
1

For me

sudo modprobe vboxdrv

works each time I have this error from my VM machine, after which

vagrant up

runs as expected.

AdminBee
  • 21,637
  • 21
  • 47
  • 71
  • Actually this seems to be a corruption that arises when the vagrant is not halted or machine has been switched off without halting vagrant. Each time sudo modprobe vboxdrv on vagrant location fixes this. – Kenedy Cheruiyot Sep 24 '21 at 05:58