I have used and tested VirtualBox which I installed from the rpmfusion repo using dnf install VirtualBox. It has worked well for me in the past.
I just tried it again and building the kernel module failed.
Check the log located at /var/cache/akmods/VirtualBox/7.2.6-1-for-6.19.6-200.fc43.x86_64.failed.log (your file name may be different for version 7.1.16) and you may find these errors logged which probably should be filed as a bug report. (probably to rpmfusion [and maybe Oracle as well])
ERROR: modpost: module vboxdrv uses symbol cr4_update_irqsoff from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
ERROR: modpost: module vboxdrv uses symbol cr4_read_shadow from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
ERROR: modpost: module vboxdrv uses symbol __flush_tlb_all from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
However, the kernel module must be installed for VB to function so it should be built if installing by rpm, regardless of the source.
Where did you install VB from? Oracle or rpmfusion?
When I download the rpm from Oracle I get VirtualBox-7.2-7.2.6_172322_fedora40-1.x86_64.rpm. I don’t see an akmod package there so they probably rely on a single kernel module that may not work with the newer kernels.
RPM-based Linux distributions
We provide a yum/dnf-style repository for Oracle Linux/Fedora/RHEL/openSUSE. All .rpm packages are signed. The Oracle public key for rpm can be downloaded here. You can add this key (not normally necessary, see below!) with
sudo rpm --import oracle_vbox_2016.asc
or combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | rpm --import -
The key fingerprint is
B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF
Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
After importing the public key, the package signature can be checked with
rpm --checksig PACKAGE_NAME
Note that importing the key is not necessary for yum users (Oracle Linux/Fedora/RHEL/CentOS) when using one of the virtualbox.repo files from below as yum downloads and imports the public key automatically! Zypper users should run
zypper refresh
I recently became aware that an updated akmod-VirtualBox with the fix for this error is available for f43 in the rpmfusion-free-updates-testing repo, but does not seem to be available for f42 (yet).
With testing the installation it did properly work for me. sudo dnf install VirtualBox --enablerepo rpmfusion-free-updates-testing (note that I am using f43)
Potentially you could remove the current version of VB you have installed (if from Oracle) then reinstall from rpmfusion with sudo dnf install VirtualBox --enablerepo rpmfusion-free-updates-testing --releasever=43.
If already installed from rpmfusion then simply use the preceding command but replace ‘install’ with ‘upgrade’.
It looks like Oracle include the “x.y” version in the name of the package.
So the package you have installed is “VirtualBox-7.1”, and doing dnf updates will never get you to “VirtualBox-7.2”, which is a package with a different name.
akmod is used for packages from rpmfusion to build the kernel modules for each specific kernel.
To avoid issues of the type you are seeing I strongly suggest removing the oracle packages and install from rpmfusion, which then should solve the problem. The rpmfusion packages are always the latest available and do not limit you to one version as is done by Oracle and their package naming.
If you really wanted to stick with the Oracle repos, you could try sudo dnf swap VirtualBox-7.1 VirtualBox-7.2.
However, like @computersavvy said, RPMFusion is generally a more convenient way for Fedora users to get the packages. So you could sudo dnf swap VirtualBox-7.1 VirtualBox to get the RPMFusion package instead. This should pull in the latest akmod and all the other RPMFusion dependencies.
Disclaimer - I don’t use VB myself so I can’t guarantee this will fix all the kernel 6.19.x related issues. But it seems from other threads like these issues don’t happen for users with the freshest versions of the RPMFusion akmod.
I don’t use oracle so this may be just a guess.
This is for using the oracle packages. sudo dnf remove VirtualBox-7.1 sudo dnf install VirtualBox 7.2
or possibly simply sudo dnf upgrade VirtualBox-7\* may accomplish both the above.
Personally I would switch to rpmfusion sudo dnf remove VirtualBox-7.1 sudo dnf install VirtualBox --releasever=43 --from-repo=rpmfusion-free-updates --enablerepo=rpmfusion-free-updates-testing
(the latest akmods-VirtualBox is in the testing repo but VirtualBox is in the updates repo)
Using the --from-repo option ensures that it comes from rpmfusion and not oracle.
Creating group ‘vboxusers’. VM users must be member of that group!
egrep: warning: egrep is obsolescent; using grep -E
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
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.
When i installed vbox last year as part of this new build, i had the same errors for the secureboot/EFi, but i do not use it.
The errors in the log are
ERROR: modpost: module vboxdrv uses symbol cr4_update_irqsoff from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
ERROR: modpost: module vboxdrv uses symbol cr4_read_shadow from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
ERROR: modpost: module vboxdrv uses symbol __flush_tlb_all from namespace module:kvm,kvm-amd,kvm-intel, but does not import it.
The test rpm server has 7.2.27, where as installed on my machine it is 7.2.26.
At this point i will assume 7.2.7 includes the fix, so it is a waiting game. Unless others are aware that despite not needing to build the kernel mods before, it is required now ?
Please read above, including the linked message I posted. This is a packaging error in the way oracle provides VB, and is fixed in the latest akmod-VirtualBox from rpmfusion-free-updates-testing.
Thanks - but i want to keep the build as vanilla as possible.
I have never had to use akmod-VirtualBox before, and i assume you have it due to the NVidia graphics card - i had this last year, so used to see the compiling, but switching to AMD i have not had to install etc.
Thanks for assisting in moving to the different version, as it did not update automatically.
Absolutely not. The GPU has nothing whatsoever to do with VirtualBox.
The akmod packages from rpmfusion are compiled to make the kernel modules using the akmods command tool.
The packages from cuda-fedoraXX-x86_64 are compiled using dkms so that does not eliminate the compiling, merely changes the tool used. It also complicates things if you need to sign the compiled modules when using secure boot.
I had the same issue.
As I didn’t have to patience to wait for an Oracle solution I replaced the VirtualBox with Virtual Machine Manager and this works great.
Just install it and use the actual VDI and convert it…
For file transfer I am using Samba.