Unable to start vboxdrv.service

Hi!

I’m struggling with starting a VirtualBox of FC37 and I’m not able to start it. The machine is created with Windows and then, exported to a FC37 where I need to start it.

The problem is when I try to start the virtual machine. First, I get an error who says:

Kernel driver not installed (rc=-1908)

In the same window, I see the message which says I have to execute (as root) some commands from the command line. The commands are:

dnf install akmod-VirtualBox kernel-devel-$(uname -r)
akmods
systemctl restart vboxdrv.service

So, I execute them and the last command gives me another error:
Job for vboxdrv.service failed because the control process exited with error code.
See “systemctl status vboxdrv.service” and “journalctl -xeu vboxdrv.service” for details.

So, I execute the command ‘systemctl status vboxdrv.service’ and I see the next error:

jun 19 11:59:37 fedora systemd[1]: Starting vboxdrv.service - Linux kernel module init script...
jun 19 11:59:37 fedora modprobe[20541]: modprobe: ERROR: could not insert 'vboxdrv': Invalid argument
jun 19 11:59:37 fedora systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE
jun 19 11:59:37 fedora systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
jun 19 11:59:37 fedora systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.

I tried to look for this error on google but no luck. Please, can anyone help me?

Thank you so much in advance!

how did you install virtualbox? From rpmfusion repo?

I just typed sudo dnf install VirtualBox into the xterm.

Have you checked ttps://rpmfusion.org/Howto/VirtualBox?

It tells how to install VirtualBox from RpmFusion.

Nope,

Let me check out and see if helps.

Thank you so much!

Have you restarted to see if that helps loading the kernel module?

One additional step beyond installing the package from rpmfusion is that one must add the user who is using virtualbox to the proper user group.
sudo usermod -a -G vboxusers <username>
followed by logging out then back in so the group is activated for that user. This is covered in the HowTo linked above.

On my system I forgot to do that and it still works.

Thank you so much all of you for your answers.

I’ve followed all steps shown here: Howto/Secure Boot - RPM Fusion and here Signing VirtualBox Kernel Modules · GitHub

But no good luck!

After reinstalling the VirtaulBox (several times) package from repositories, I did the next steps:

sudo dnf install akmod-VirtualBox kernel-devel-$(uname -r)
sudo akmods
sudo systemctl restart vboxdrv.service

After that, I started a Virtual Box Machine and I had exactly the same result.

After that, I restarted the system (shutdown -r now) and I checked out the systemctl status vboxdrv, and the error remains:

× vboxdrv.service - Linux kernel module init script
     Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-06-20 08:45:36 CEST; 6min ago
    Process: 1531 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=1/FAILURE)
   Main PID: 1531 (code=exited, status=1/FAILURE)
        CPU: 24ms

jun 20 08:45:36 fedora systemd[1]: Starting vboxdrv.service - Linux kernel module init script...
jun 20 08:45:36 fedora modprobe[1531]: modprobe: ERROR: could not insert 'vboxdrv': Key was rejected by service
jun 20 08:45:36 fedora systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE
jun 20 08:45:36 fedora systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
jun 20 08:45:36 fedora systemd[1]: Failed to start vboxdrv.service - Linux kernel module init script.

Finally, my user is part of the vboxusers group, as you can see here:

guillermo@fedora:~$ id
uid=1000(guillermo) gid=1000(guillermo) grupos=1000(guillermo),981(vboxusers) contexto=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
1 Like

Enroll the akmods key, or disable Secure Boot in the BIOS/EFI settings.

1 Like

Yes, that’s exactly what I’ve done and it solved my problem.

Thank you so much all of you again and forgive the inconvenience!