DEV Community

nabbisen
nabbisen

Posted on • Updated on

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

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 : )

Top comments (37)

Collapse
 
aze96 profile image
aze96 • Edited

Hello heddi,

I've the same issue as you describe. But your solution does not help :/
I can install virtualbox without any problem. But when i want to start a
new vm the error windows pops up.

I tried the command 'sudo vboxreload' in the terminal with
the follow output(thepracticaldev.s3.amazonaws.com/i...)

Hope for your help.

Collapse
 
nabbisen profile image
nabbisen • Edited

Hi aze96,
Thank you for your commenting, and question + screenshot :)

vboxnetadp not found

I think it's the keyword, but know little about your environment.
Which OS do you use?
Also, how have you installed your VirtualBox? -- as far as you remember it.

Collapse
 
aze96 profile image
aze96

Hi Heddi,

Thank you for your fast reply.

OS: Manjaro 18.1.1
Kernel: 5.2.21

I installed it over the AUR Repository (thepracticaldev.s3.amazonaws.com/i...)

Thread Thread
 
nabbisen profile image
nabbisen • Edited

aze96,
you're welcome. I'm interested.

Thanks.
Your kernel is 5.2.21 and VBox is 6.0.12.
The error in your first screenshot is /lib/modules/5.2.21-*.
How about the versions of virtualbox-host-modules or virtualbox-host-dkms in Manjaro Package Manager?

Thread Thread
 
aze96 profile image
aze96

Hi,

virtualbox-host-modules is 6.0.12-2.
I have not installed virtualbox-host-dkms. Should i install it?

Thread Thread
 
nabbisen profile image
nabbisen • Edited

Hi, aze96,

I have updated my comment I wrote yesterday:

OK. I don't think so but am not sure. I'll check it tomorrow.

Well, I have checked it by installing Manjaro onto clean env.

Q1. Have you chosen linux_52_-virtualbox-host-modules? 5(.)2 is your kernel version.

Q1
Q1

Q2. What does sudo modprobe vboxdrv return in command line?

Thread Thread
 
aze96 profile image
aze96

Yeyyy!!!!

It finally works. You where right. I had to install this host module. Now i can run Virtualbox and VM's without problem.

Thank you for helping :)

Have a nice day.

sorry that i answered that late i was afk yesterday btw.

Thread Thread
 
nabbisen profile image
nabbisen

Yey, wonderful :)
I was not wholly sure, and now feel happy to hear it.
You're welcome. Also, no problem on your answering.
Have a nice day, too.

Collapse
 
tortupizza profile image
Saclier

Hello I just follow your guide step by step, but it doesn't fix the problem for me :'(
what did i did wrong ?
here is all I downloaded and installed ( dev-to-uploads.s3.amazonaws.com/i/... )

Collapse
 
nabbisen profile image
nabbisen

Hello, Saclier.
Your screenshot looks correct to me... 🤔

According to Manjaro page,
mhwd-kernel -li tells which kernel actually runs.

Also, according to Manjaro forum,
there has been an issue in VirtualBox just with Kernel 4.19, which I don't know is related to your case.

Would these information be your help 🙂 ?

Collapse
 
tortupizza profile image
Saclier

Hi.
I m running the kernel : 419
In the actual situation Virtualbox return the error when i try to launch Windows.
I look the forum you linked but I can't understand why it doesn't work for me.
Did I just cant use VB with my kernel version ?
Thank you for your quick answer.

Thread Thread
 
nabbisen profile image
nabbisen

Hi. Thank you for your check.

Did I just cant use VB with my kernel version ?

I'm not sure now. I'll check in a few days with the same kernel version to yours.

Thread Thread
 
nabbisen profile image
nabbisen

Saclier,
I tried to run vm with VirtualBox in Manjaro whose kernel is 4.19.
It was successful ☺️

Have you installed "linux 419 -virtualbox-host-modules" ?


Linux Kernel

kernel 4.19

Manjaro Package Manager

packages 1/2
packages 1/2

VirtualBox

VirtualBox
vm


I'm sorry to be late for this reply.
Time was necessary in order to find a Manjaro machine as I had recently used Debian ones.

Collapse
 
halldorstefans profile image
Halldor Stefansson

Thank you :D

Collapse
 
nabbisen profile image
nabbisen

Thank you for your comment.
Did you meet the same problem?
I'm happy if it helped you :)

Collapse
 
halldorstefans profile image
Halldor Stefansson

Yes, had the same problem. Needed the last step.
Once I did 'vboxreload' it worked.
Thank you for sharing this :)

Thread Thread
 
nabbisen profile image
nabbisen

That's a good news.
You are welcome!
Thank you, too.

I wonder why I needed to take the former steps then.
It might be some package problem.

Collapse
 
kreezxil profile image
kreezxil

Just shy of 2 plus years later and this article is as relevant as ever! Thank you it has allowed me to keep more of my hair!

Collapse
 
nabbisen profile image
nabbisen

Thank you, too, for your commenting 😊
I didn't imagine this post would help you more than 2 years later, of course, then.
I feel happy to know it helped you and your hair 😁

Collapse
 
kreezxil profile image
kreezxil

Btw, you can make the article more current by specifying that on Manjaro 20+ vboxconfig should be replaced with vboxreload.

Thread Thread
 
nabbisen profile image
nabbisen

Thank you for detail. Yes, my Manjaro version at that time seemed 19 or around.
I think it's better to correct this post than make a new one, but I have used Arch-based Artix recently and don't know how now. I'll try at some point or another.
Well, anyway, the correct information has been brought already here by you. Thank you 🤭

Collapse
 
kushald007 profile image
kushald007

Thank you. Resolved the issue for me.

Collapse
 
nabbisen profile image
nabbisen

It's a happy news.
Thank you.
I feel happy to hear it :)

Collapse
 
m3dsh profile image
m3dsh

Thank u, that was life-saving:)

Collapse
 
nabbisen profile image
nabbisen

Hi, m3dsh.
Oh, really 😁
I'm happy to hear it!
Thank you for your message.

Collapse
 
julitroalves profile image
Julio Alves

Thanks a lot, you helpe me so much!

Collapse
 
nabbisen profile image
nabbisen

Thanks, too, to give me a happy news 😄

Collapse
 
0ctavia profile image
Octa

Thank you very much, you just solved a good hour of google searches

Collapse
 
nabbisen profile image
nabbisen

Thank you, too, to leave your comment on my post 😁
I know how the feeling is when google searches never bring the very solution 😉

Collapse
 
stansteve profile image
charnoo

Thanks for great tutorial, it fixed it.

Collapse
 
nabbisen profile image
nabbisen

Hi, charnoo,
Thank you for your message.
I'm happy to hear your problem has been solved ☺️

Collapse
 
caisensama profile image
caisen

Thanks for sharing :) It helps.

Collapse
 
nabbisen profile image
nabbisen

Thank you for your comment.
I'm happy to hear it :)

Collapse
 
jluisbc profile image
JLuisBC

Thank you.
Excellent

Collapse
 
nabbisen profile image
nabbisen

Thank you for your good news.
I'm happy if my post helped you : )

Collapse
 
arthurazs profile image
Arthur Zopellaro

This solved my issue, thank you very much :)

Collapse
 
nabbisen profile image
nabbisen

Hi Arthur,
It's very good to your issue was solved.
Thank you, too, for your writing comment :)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.