Virtualbox-6.0 - Cannot run a virtual box

I’m trying to run Oracle Virtualbox-6.0 on a librem 13v4 running PureOS. Starting a new virtualbox, the software complains “Kernel drivers not installed” and tells me to run

/sbin/vboxconfig

as root. I can do that, however, then receive the following output:

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
 
There were problems setting up VirtualBox.  To re-start the set-up process, run
/sbin/vboxconfig 
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

Has anybody encountered this problem before and if so, how did you solve it? I don’t really know what to do with it.

Thanks in advance!

What do the relevant dmesg lines show? I don’t know if the Librem laptops have Secure Boot, but if they do then it’s most likely a driver signing issue. It’s been a problem for years and Oracle refuses to do anything about it.

Tbe dmesg output after running

sudo /sbin/vboxconfig

is

[25271.253421] module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 1, loc 00000000a455ac33, val ffffffffc11914cf

Thanks @Jt0 for your fast reply. I saw on various sites that this has been an issue for years w/ Oracle. Any good alternative, that really lets you configure and lock down VMs?

Thanks

I’m not sure what that error is. The problem I’ve usually had is having to sign the Virtualbox drivers manually every time I do a kernel update. You can write a systemd service to handle it automatically but it’s a huge, unnecessary pain that drove me away from using Virtualbox despite the simplicity of sharing folders once you get it set up.

A good alternative is libvirt, which runs QEMU under the hood. The easiest way to use libvirt is with the virt-manager GUI (most distros provide a virt-manager package). Until recently it provided less flexibility than libvirt or QEMU, but recently the ability to edit the VM settings in XML directly was added.

From the line you posted it looks like a 3-month-old issue specific to Debian and presumably its derivatives like PureOS. I’m not sure if it’s related to the driver signing problem or not.

Thanks for the tip about virt-manager. This looks pretty interesting and seems to have the settings that I require, which is not much, but I want to be able to control network access, etc. I’ll give this a try, seems like not using virtualbox might be the right way to go here anyway… Maybe Oracle might fix it in the next 7 to 10 years… we should all set a calendar appointment to check back in :wink:
Thanks for the tips @Jt0, this is very helpful!

1 Like

Unless you are doing something that benefits from VirtualBox’s additions specifically, I would strongly suggest using QEMU instead. The drivers are mainline in the kernel (kvm), the licensing is not a mess, and it’s not an Oracle product (plus it “just works” for nearly anything you could want from a VM).

2 Likes

Installed virt-manager, installed 3 operating systems. Conclusions:
It has everything I require from a VM environment, all configurations necessary are included, and is super fast in doing so! Thanks for the hint and the really fast responses, everything is working already :slight_smile:

1 Like

I’ve found that QEMU/KVM on Pure is easier to deal with that VirtualBox. I’ve also been able to get VirtualBox running by playing around with earlier releases. As these things tend to go, open source on Purism, as one might expect, tends to deliver better results.

Oh, and if anyone figures out how to get a VM’s network interface running in bridged mode, I will send you a candy bar if you shared how you did it. I have yet to sort it out and the documentation I’ve found has been more Fedora based.