F37 Virtualbox module doesn't load in kernel-6.0.8

I’ve done several upgrades from F36 to F37 and mostly works flawless, except that VirtualBox doesn’t want to start, due to missing vboxdrv module.
Gives an error:
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/6.0.8-300.fc37.x86_64
I’ve checked and module is present

#ls /lib/modules/6.0.8-300.fc37.x86_64/extra/VirtualBox
drwxr-xr-x 2 root root   4096 Nov 16 01:36 .
drwxr-xr-x 3 root root   4096 Nov 16 01:36 ..
-rw-r--r-- 1 root root 146840 Nov 16 01:34 vboxdrv.ko.xz
-rw-r--r-- 1 root root   5132 Nov 16 01:34 vboxnetadp.ko.xz
-rw-r--r-- 1 root root  13856 Nov 16 01:34 vboxnetflt.ko.xz

as all seems the same with F36 where it was working normally

#ls /lib/modules/6.0.8-200.fc36.x86_64/extra/VirtualBox/ -al
drwxr-xr-x 2 root root   4096 Nov 15 18:31 .
drwxr-xr-x 3 root root   4096 Nov 15 18:31 ..
-rw-r--r-- 1 root root 146808 Nov 15 18:31 vboxdrv.ko.xz
-rw-r--r-- 1 root root   5132 Nov 15 18:31 vboxnetadp.ko.xz
-rw-r--r-- 1 root root  13852 Nov 15 18:31 vboxnetflt.ko.xz

when i try #modprobe vboxdrv I get same response that module not found. Secure boot is not on in Bios, as it wouldn’t work even before.
Probably something changed in Fedora 37 that prevents module from loading, but it’s strange that it reports how module not found when it’s there
I have also tried to reinstall kernel module:

dnf reinstall akmod-VirtualBox kernel-devel-6.0.8-300.fc37.x86_64
akmods --kernels 6.0.8-300.fc37.x86_64
systemctl restart vboxdrv.service

Also rebooting computer didn’t help

Any ideas?

I had a similar problem after I did the dnf system-upgrade.

I went through a process on uninstalling VirtualBox and akmod packages, then installed the lastest versions using --enablerepo=updates-testing, and now things are working.

I am using the packages from rpmfusion, I am not installing direct from the website.

> rpm -qa | grep VirtualBox
VirtualBox-kmodsrc-7.0.2-1.fc37.noarch
VirtualBox-server-7.0.2-1.fc37.x86_64
akmod-VirtualBox-7.0.2-1.fc37.x86_64
VirtualBox-7.0.2-1.fc37.x86_64
kmod-VirtualBox-6.0.7-200.fc36.x86_64-7.0.2-1.fc37.x86_64
kmod-VirtualBox-6.0.8-300.fc37.x86_64-7.0.2-1.fc37.x86_64
Installed Packages
Name         : akmod-VirtualBox
Version      : 7.0.2
Release      : 1.fc37
Architecture : x86_64
Size         : 45 k
Source       : VirtualBox-kmod-7.0.2-1.fc37.src.rpm
Repository   : @System
From repo    : rpmfusion-free-updates-testing
Summary      : Akmod package for VirtualBox kernel module(s)
URL          : http://www.virtualbox.org/wiki/VirtualBox
License      : GPLv2 or CDDL

Try installing the packages from rpmfusion-free-updates-testing ?

2 Likes

I’ve done uninstalling and did list of VirtualBox versions
dnf list --enablerepo=updates-testing VirtualBox
but it only shows version 6.1.40.
Did you install via dnf or directly downloading rpms?

That repo should be rpmfusion-free-updates-testing as shown above.

1 Like

In my case, after updating from F36 to F37 the system finished with a mix of virtualbox packages and versions coming from different types of prior installations.
I realized that the system kept an Oracle repository in /etc/yum.repos.d/virtualbox.repo from a previous installation attempt I tried in the past, so I decided to ignore it and only use the packages from @rpmfusion-free repository (not the testing one).

So, I removed all virtualbox packages listed with the following command:

dnf list installed | grep irtual.o

and then I removed them:

dnf remove VirtualBox-kmodsrc.noarch VirtualBox-server.x86_64 akmod-VirtualBox.x86_64 kmod-VirtualBox-6.0.7-200.fc36.x86_64.x86_64 kmod-VirtualBox-6.0.8-200.fc36.x86_64.x86_64 kmod-VirtualBox-6.0.8-300.fc37.x86_64.x86_64 kmod-VirtualBox-6.0.8-300.fc37.x86_64

and I disabled the old Oracle repo:

dnf config-manager --disablerepo virtualbox

Then I installed vboxdrv and kernel drivers from @rpmfusion-free:

dnf install akmod-VirtualBox kernel-devel-$(uname -r) VirtualBox

As Secure Boot was activated, I had to sign kernel modules with the following script:

/root/bin/sign-xz-vbox-modules

I activated vboxdrv module with:

modprobe vboxdrv

And finally, I checked all packages installed came from the same repository and version:

dnf list installed | grep irtual.o
VirtualBox.x86_64                                 6.1.40-1.fc37                        @rpmfusion-free                               
VirtualBox-kmodsrc.noarch                         6.1.40-1.fc37                        @rpmfusion-free                               
VirtualBox-server.x86_64                          6.1.40-1.fc37                        @rpmfusion-free                               
akmod-VirtualBox.x86_64                           6.1.40-1.fc37                        @rpmfusion-free                               
virtualbox-guest-additions.x86_64                 6.1.40-1.fc37                        @updates                                      

And voilà, it worked fine for me.

2 Likes

If someone else hits your post with the same problem, I think it would be helpful stating in your initial post that you are using VirtualBox from rpmfusion repo (and not from virtualbox repo). It can be seen by the package name but that wouldn’t be obvious to everyone.
Thanks.

I’ve managed to get it working the v 7.0.2. When I put --enablerepo=rpmfusion-free-updates-testing VirtualBox before list or install than it showed versions.
I had to play around with extensions, to be able to start VM.
So I’ve done:

dnf remove VirtualBox VirtualBox-server akmod-VirtualBox
dnf -y in  VirtualBox VirtualBox-server akmod-VirtualBox
VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-7.0.2.vbox-extpack
reboot

I was able to modprobe vboxdrv right away, but looks like there are extra modules that needed to be loaded, as it was givinig me an error about NET, but after reboot. It started VMs with no problems.

Thanks @augenauf ,
I wasn’t able to modify my post any more, to mark that I’m talking about rpmfusion repo

I’ve done an upgrade on another machine, and this time upgrade went fine, and VirtualBox was upgraded to 7.0.2 without rpmfusion-testing repo, so it looks like this issue has been solved

1 Like

for me just installing the “linux-devel” packages fixed the problem

1 Like