VirtualBox: How To Fix Failure In Starting VM (On Manjaro Linux)

nabbisen - Oct 4 '18 - - Dev Community

Intro

Manjaro Linux is one of Linux distros based on Arch Linux.
This is my favorite one because of its flexible user interface and powerful package management.

I have failed in running a virtual machine using VirtualBox, however, not few times.
This has been found to be simply because of my way to install VirtualBox.
Thus I decided to write and record how to fix it in order to escape from failing again.

* note: The official document is here.

Problem

An error occurs when trying to run a virtual machine:

Error messages #1:

Error messages #2:

It says:

  • "Kernel driver not installed (rc=-1908)"
  • "VERR_VM_DRIVER_NOT_INSTALLED"
  • "The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv."

But, to my confusion, there is no '/sbin/vboxconfig' in my Manjaro machine.
I know now this is a problem that some modules in /lib/modules/extramodules-[kernel version]-MANJARO/ such as vboxdrv and vboxpci are missing.

Solution

Preparation

  1. Get kernel version

For example, use uname -r command:



$ uname -r
4.14.71-1-MANJARO

Enter fullscreen mode Exit fullscreen mode




Procedure

  1. Run Pamac installer.

  2. Search "virtualbox".

  3. Select "Oracle VM VirtualBox (virtualbox)" and install it.

  4. When the below modal opens, select NOT "virtualbox-host-modules" BUT "linux[kernel version]-virtualbox-host-modules":

    NOT:

    BUT:
    (The version is up to the host machine.)

  5. Run vboxreload command if there is still an error.



$ sudo vboxreload 
Loading modules: vboxnetadp vboxnetflt vboxpci vboxdrv
Enter fullscreen mode Exit fullscreen mode




Outro

Thank you very much for your reading.
I'm happy if this post helps someone who has the same problem in some way : )

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .