VirtualBox from RPMFusion not working on Rocky Linux 9

Hi,

Until a few months ago I’ve been using VirtualBox on Rocky Linux 9 for my local university courses, and this has worked perfectly.

Not it looks like this setup doesn’t work anymore. On a fresh Rocky Linux 9 installation with KDE from EPEL and RPMFusion activated, I install the VirtualBox package, add my user to the vboxusers group and then reboot. And then I get this:

# systemctl status vboxdrv
× vboxdrv.service - Linux kernel module init script
     Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2025-07-07 09:21:32 CEST; 16s ago
    Process: 1910 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=1/FAILURE)
   Main PID: 1910 (code=exited, status=1/FAILURE)
        CPU: 1ms

Jul 07 09:21:32 sandbox systemd[1]: Starting Linux kernel module init script...
Jul 07 09:21:32 sandbox modprobe[1910]: modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.14.0-570.23.1.el9_6.x86_64
Jul 07 09:21:32 sandbox systemd[1]: vboxdrv.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 09:21:32 sandbox systemd[1]: vboxdrv.service: Failed with result 'exit-code'.
Jul 07 09:21:32 sandbox systemd[1]: Failed to start Linux kernel module init script.

How do you guys install VirtualBox ? Are you having similar issues ? Any suggestions ?

This is one big reason why I stopped using VirtualBox 10+ years ago because I got fed up of the kernel modules not being generated. And why I prefer KVM now for all my VM’s.

On Fedora 42 from rpmfusion I see an akmod-Virtualbox package - maybe you have this option as well to install? Mostly the modules aren’t generating on new kernels due to lack of kernel-headers or dkms but I’m only guessing because I hate Virtualbox and will never use it again anyway. But probably the reason why going by your error message.

1 Like

For my personal use, I’ve also adopted KVM/libvirt even on the desktop. But for my university classes I’m stuck with VirtualBox since my students’ laptops sport a happy mix of Windows, Linux and macOS.

I’ve experimented a bit more and wrote an Ansible role that installs Oracle’s VirtualBox from their repositories:

One thing I try to wrap my head around for the moment is how to automate Oracle’s VirtualBox Extension Pack installation. This one’s a bit of a PITA.

Any suggestions for this one ?

I’d be tempted just to use the url in the playbook to download the extension pack and install it. Obviously it’s less dynamic, and would require refreshing the url.

While it’s still good to advertise issue on shared forum , it doesn’t worth a due report.
If you have an issue with virtualbox provided by rpmfusion, then a ticket is due into bugzilla.rpmfusion.org. I would recommends to do it beforehands.

It might be because vboxdrv failed to build for your kernel for any reason… if you can find the logs, it would be fine.

After much trial and error, here’s an Ansible role for installing VirtualBox on any 8.x or 9.x RHEL clone (tested on both Rocky Linux and AlmaLinux), along with Oracle’s Extension Pack.

Works like a charm.