Virtualbox not working

Installed Virtalbox and was greeted with this message when I tried to run it:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is probably not loaded.You may not have kernel driver installed for kernel that is runnig, if so you may do as root: dnf install akmod-VirtualBox kernel-devel-$(uname -r)If you installed VirtualBox packages and don’t want reboot the system, you may need load the kernel driver, doing as root: akmods; systemctl restart vboxdrv.service

If your system has EFI Secure Boot enabled you may also 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.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

I tried following the instructions but was met with another error. I have secure boot enabled and would prefer to keep it that way. Is there any way to get Virtualbox working without giving up secure boot? Thanks

See the file /usr/share/doc/akmods/README.secureboot

1 Like

Thanks for reply. I will try it, but the instructions are a bit vague, probably intended for people with a much deeper knowledge of kernels and keys than me…

Has this tutorial got it right?

Point one: Creating the key

At the first run of the akmods.service, certificate and keypair will be
created with default value using the '/usr/sbin/kmodgenca' script.

That means that the key is already created by now.

Point two: Enrolment of the key

- Ask MOK to enroll new keypair with certificate with the command
  `mokutil --import /etc/pki/akmods/certs/public_key.der`.
- mokutil asks to generate a password to enroll the public key.
- Rebooting the system is needed for MOK to enroll the new public key.
- On next boot MOK Management is launched and you have to choose
  "Enroll MOK".
- Choose "Continue" to enroll the key or "View key 0" to show the keys
  already enrolled.
- Confirm enrollment by selecting "Yes".
- You will be invited to enter the password generated above.

You can check if the modules has already been signed

 modinfo /usr/lib/modules/6.3.6-200.fc38.x86_64/extra/VirtualBox/vboxdrv.ko.xz
3 Likes

For me, running 38 Xfce and any 6.3 kernel, VirtualBox 7.0.6 would not work. I was getting the same error messages outlined in this thread. Any suggested solution would also not work. If I booted to the last remaining 6.2 kernel on my system VirtualBox worked well.

My solution was to remove 7.0.6 and install 7.0.8 from Oracle. All is well now.

7.0.8 works well under 38 Workstation also.

Secure boot is, and always was, disabled on my old Dell Latitude i7.

That is a totally different way not compatible with what you have already done.

1 Like

VirtualBox-7.0.8-1.fc38.x86_64 from RpmFusion works for me without problem.

That solution works but gives up the easy automatic recompile of the modules when one has a kernel update that is available when using the package from rpmfusion with akmods.
I suspect it also has problems with signing the kernel modules for use with secure boot as requested by the OP.

The dkms is used by pretty much every distribution other than RedHat and Co. It will do automatic updates with every new kernel and it will do the automatic signing as well. The RpmFusion packages with akmods are packaged to the Fedora standard and tested in the Fedora environment. The Oracle packages may be less well tested on Fedora.

1 Like

mokutil --import /etc/pki/akmods/certs/public_key.der
EFI variables are not supported on this system

Does that mean my system (no UEFI Bios but Legacy ASUS Bios) is no longer compatible with the Virtualbox?

In VirtualBox you can configure whether it should support UEFI or not.

Screenshot_2023-09-05_11-01-20

It is not dependent on you ASUS mother board.

Once your guest OS is installed in VirtualBox, don’t change this setting, as your OS won’t boot.

I much prefer libvirt, perfect app.
For example creating 5 virtual HDD and raid10 :slight_smile:
(use Virtual machine control panel or Cockpit)

1 Like

This means that the system is booting in legacy mode.

Secure boot is only active when booted uefi so that would mean your system in legacy mode never checks whether the modules are signed and always is able to load them (just like it does when using uefi and having secure boot disabled).

VirtualBox itself does not care if using secure boot or not. The kernel does when booting uefi but does not when booting legacy mode. Signing the kernel module is only useful when using uefi AND having secure boot enabled.

Thus, NO. It should not impact VirtualBox at all.

The same would apply to any other app or driver that has a self-compiled kernel module to be loaded.

The problem is that I can’t get the kernel modules to work on the host system (Fedora 38).

I’m pretty slow at solving everything with libvirt, but I have some VM’s that I would like to get running in Virtualbox again.

1 Like

When I try to install VirtualBox from Oracle I get the following error message:

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: failed: Cannot unload module vboxdrv.

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.

That’s why I thought that the VBox only works with UEFI bios and in secure boot

There was an issue awhile back with a kernel update that caused virtualbox to stop working if installed from the virtualbox site.From what I read on the vbox forum vbox needs a patch to work and they suggested to install the test version until the next version of vbox was released.I removed vbox and installed it from rpmfusion which had the patch added.I have had no issues with vbox from rpmfusion so you might try that.Just to add I was having the same error you posted.

Removed VirtualBox from Oracle and installed the one from rpmfusion

Pasted image

akmods Checking kmods exist for 6.4.13-200.fc38.x86_64 [ OK ]

systemctl restart vboxdrv.service
Job for vboxdrv.service failed because a fatal signal was delivered to the control process.
See “systemctl status vboxdrv.service” and “journalctl -xeu vboxdrv.service” for details.
[root@q6600 ste]# systemctl status vboxdrv.service
× vboxdrv.service - Linux kernel module init script
Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: failed (Result: signal) since Thu 2023-09-07 18:25:13 CEST; 17s ago
Process: 23149 ExecStart=/sbin/modprobe vboxdrv (code=killed, signal=KILL)
Main PID: 23149 (code=killed, signal=KILL)
CPU: 197ms

Sep 07 18:25:13 q6600 systemd[1]: Starting vboxdrv.service - Linux kernel module init script…
Sep 07 18:25:13 q6600 systemd[1]: vboxdrv.service: Main process exited, code=killed, status=9/KILL
Sep 07 18:25:13 q6600 systemd[1]: vboxdrv.service: Failed with result ‘signal’.
Sep 07 18:25:13 q6600 systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.

I don’t know what happend with my VBox?

I got hit by this issue a couple of weeks ago and my workaround was simply to load the kernel module manually

modprobe -a vboxdrv