How to Install VirtualBox on Fedora Linux

Last updated Thursday, April 2, 2026 11:45 am Joshua James 7 min read

Running another operating system on the same Fedora machine is still one of the easiest ways to test software, build disposable lab environments, or keep a second desktop around for one Windows-only task. If you need to install VirtualBox on Fedora, the current Fedora 43 path to trust is RPM Fusion’s package, because Oracle’s own Fedora repository currently leaves vboxdrv unbuilt on Fedora’s 6.19 kernel line.

The package installs from a terminal on Workstation, Server, and minimal Fedora systems, but the VirtualBox Manager still needs an active graphical session when you want to open the GUI. This RPM Fusion workflow builds the matching host modules, adds your account to vboxusers, and covers the optional Extension Pack plus guest additions for Fedora guests.

Install VirtualBox on Fedora

Fedora’s default repositories do not ship the VirtualBox host package. On Fedora 43, RPM Fusion Free is the working source for VirtualBox, while Oracle’s upstream Fedora repository currently fails to build a usable vboxdrv module on the stock 6.19 kernel series.

Update Fedora Before You Install VirtualBox

Refresh package metadata first so Fedora and RPM Fusion resolve against the same current package set.

sudo dnf upgrade --refresh -y

These commands use sudo for package and module changes. If your account is not in the sudoers file yet, follow the guide to add a user to sudoers on Fedora before continuing.

If the upgrade installs a new kernel, reboot before continuing so the running kernel, the matching kernel-devel package, and the VirtualBox module build all line up.

Enable RPM Fusion for VirtualBox on Fedora

RPM Fusion Free carries the Fedora-native VirtualBox package plus the akmod-VirtualBox module source that builds cleanly on Fedora 43’s current kernel. The $(rpm -E %fedora) expression expands to your installed Fedora release so the same command works across current Fedora branches.

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y

Confirm that the RPM Fusion Free repositories are enabled before you install the package.

dnf repo list --enabled | grep -i rpmfusion

Expected output:

rpmfusion-free         RPM Fusion for Fedora 43 - Free
rpmfusion-free-updates RPM Fusion for Fedora 43 - Free - Updates

If you want the broader repository background as well, see how to install RPM Fusion on Fedora.

Install VirtualBox and Build Fedora Kernel Modules

Install the host package and its akmod companion together. The akmod-VirtualBox package pulls in akmods, which in turn requires gcc, make, and the matching kernel-devel package for the running kernel.

sudo dnf install VirtualBox akmod-VirtualBox -y

The first module build can take a minute or two on a slower VM. Running the build once right away keeps the first launch from racing the background akmods job.

sudo akmods --kernels $(uname -r)
sudo systemctl restart vboxdrv

Finish by checking that the loader service brought in the host modules cleanly.

sudo systemctl status vboxdrv --no-pager

Relevant output includes:

● vboxdrv.service - Linux kernel module init script
         Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
         Active: active (exited)
        Process: 38833 ExecStart=/sbin/modprobe vboxdrv (code=exited, status=0/SUCCESS)
        Process: 38838 ExecStart=/sbin/modprobe vboxnetflt (code=exited, status=0/SUCCESS)
        Process: 38840 ExecStart=/sbin/modprobe vboxnetadp (code=exited, status=0/SUCCESS)

RPM Fusion appends its own suffix to the version string, which matters later when you build the Extension Pack download URL.

vboxmanage --version

Expected output:

7.2.6_RPMFUSIONr172322

Add Your User to the vboxusers Group on Fedora

VirtualBox uses the vboxusers group for USB access and similar passthrough features. The -aG flags append your account to the new group instead of replacing every supplementary group you already have.

sudo usermod -aG vboxusers $USER

Start a new login session after that change, then confirm that vboxusers appears in your group list.

groups $USER

Expected output:

joshua wheel vboxusers

Launch VirtualBox on Fedora

RPM Fusion installs both the GUI launchers (VirtualBox and virtualbox) and the CLI helpers (VBoxManage and vboxmanage). Search for VirtualBox in Activities, or start the Manager from a graphical terminal session:

VirtualBox

If you are connected over plain SSH or working on a Server/minimal Fedora install without a desktop session, the package can still be installed and updated there, but the Manager window will not open until a graphical session is available.

Install the VirtualBox Extension Pack on Fedora

The Oracle Extension Pack is optional, but it adds USB 2.0 and 3.0 passthrough, PXE ROM support, and a few host integrations the base RPM does not ship. The Extension Pack version must match the base VirtualBox version exactly, so strip the RPM Fusion suffix before you build the download URL.

Keep the same terminal open for the next commands so the VERSION, FILE, and URL variables stay available.

VERSION=$(vboxmanage --version | sed -E 's/_RPMFUSIONr.*//; s/r.*//')
FILE=Oracle_VirtualBox_Extension_Pack-${VERSION}.vbox-extpack
URL=https://download.virtualbox.org/virtualbox/${VERSION}/${FILE}

printf "Version: %s\nURL: %s\n" "$VERSION" "$URL"

Expected output:

Version: 7.2.6
URL: https://download.virtualbox.org/virtualbox/7.2.6/Oracle_VirtualBox_Extension_Pack-7.2.6.vbox-extpack

Download the matching Extension Pack and confirm that the file landed where you expect.

curl -fsSLO "$URL"
ls -lh "$FILE"

Expected output:

-rw-r--r--. 1 joshua joshua 20M Apr  2 11:08 Oracle_VirtualBox_Extension_Pack-7.2.6.vbox-extpack

VBoxManage can accept the license non-interactively if you feed it the SHA-256 of the extracted license text. That keeps the install copy-and-pasteable in a standard shell session.

LICENSE_HASH=$(tar -xOf "$FILE" ./ExtPack-license.txt | sha256sum | awk '{print $1}')
sudo vboxmanage extpack install --replace --accept-license="$LICENSE_HASH" "$FILE"

Expected output includes:

License accepted.
Successfully installed "Oracle VirtualBox Extension Pack".

Verify the system-wide Extension Pack state with sudo vboxmanage, not the unprivileged wrapper, so you do not read stale per-user cache data.

sudo vboxmanage list extpacks

Expected output:

Extension Packs: 1
Pack no. 0:   Oracle VirtualBox Extension Pack
Version:        7.2.6
Revision:       172322
Edition:
Description:    Oracle Cloud Infrastructure integration, PXE ROM.
VRDE Module:
Crypto Module:
Usable:         true
Why unusable:

Remove the downloaded archive once the Extension Pack is in place.

rm -f "$FILE"

Install VirtualBox Guest Additions in Your VMs

Guest Additions are installed inside the guest operating system, not on the Fedora host. Use the guest’s native package when it exists, and fall back to the ISO installer when the guest distro does not package its own additions.

Install VirtualBox Guest Additions in Fedora Guests

Fedora guests can install the packaged additions directly with DNF, which is cleaner than mounting the ISO every time.

sudo dnf install virtualbox-guest-additions -y
sudo reboot

After the guest comes back, confirm that the additions package is present.

rpm -q virtualbox-guest-additions

Expected output:

virtualbox-guest-additions-7.2.6-1.fc43.x86_64

Install VirtualBox Guest Additions in Other Linux Guests

If the guest distro does not ship its own additions package, install that guest’s compiler toolchain and matching kernel headers first, then mount the Guest Additions ISO from the VirtualBox menu and run the installer.

sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
sudo /mnt/cdrom/VBoxLinuxAdditions.run
sudo reboot

Install VirtualBox Guest Additions in Windows Guests

For Windows guests, choose Devices > Insert Guest Additions CD Image from the VirtualBox menu, then run VBoxWindowsAdditions.exe from the mounted drive if the installer does not start automatically. Reboot the Windows guest after the wizard finishes so display resizing, clipboard sync, and shared-folder support all pick up the new drivers.

Fix VirtualBox Problems on Fedora

Most Fedora 43 VirtualBox failures fall into three buckets: the host modules did not finish building, Secure Boot blocked the modules, or a kernel update landed before akmods rebuilt the current tree. Start with the module build first, because it fixes the common rc=-1908 and missing-vboxdrv errors.

Fix VirtualBox Driver Build Failures on Fedora

If VirtualBox or vboxmanage reports Kernel driver not installed (rc=-1908), rebuild the host modules for the running kernel and reload the service.

sudo akmods --kernels $(uname -r)
sudo systemctl restart vboxdrv

If the rebuild complains about missing kernel build files, check the exact kernel-devel package for the running kernel. For the broader background on Fedora’s split between userspace headers and module build trees, see how to install Linux kernel headers on Fedora.

rpm -q kernel-devel-$(uname -r)

Expected output:

kernel-devel-6.19.10-200.fc43.x86_64

Finish by checking the loader service again. If it still is not active, the build log usually tells you whether the problem is a missing kernel package or a Secure Boot signature rejection.

sudo systemctl status vboxdrv --no-pager

Relevant output includes:

● vboxdrv.service - Linux kernel module init script
        Loaded: loaded (/usr/lib/systemd/system/vboxdrv.service; enabled; preset: enabled)
        Active: active (exited)

Fix Secure Boot Errors with VirtualBox on Fedora

On UEFI systems, a successful akmods build can still leave vboxdrv unloaded if Secure Boot rejects the module signature. Install mokutil if you do not already have it, then check the current Secure Boot state.

sudo dnf install mokutil -y
mokutil --sb-state

Relevant output usually looks like one of these lines:

SecureBoot enabled
SecureBoot disabled
EFI variables are not supported on this system

The third line means the machine was not booted with UEFI support, so Secure Boot is not active there. If the command reports SecureBoot enabled and the kernel log mentions Key was rejected by service or vboxdrv, enroll the akmods MOK key before retrying sudo systemctl restart vboxdrv, or disable Secure Boot for that host. If the command reports SecureBoot disabled or the EFI-variables message above, go back to the module rebuild steps instead.

Update or Remove VirtualBox on Fedora

Update VirtualBox on Fedora

VirtualBox and its akmod package update through standard DNF maintenance. After a package update, return to the driver rebuild section if Fedora also pulled in a new kernel and the modules are still rebuilding in the background.

sudo dnf upgrade --refresh -y

Remove VirtualBox on Fedora

Remove the Extension Pack first if you installed it, because the pack is managed outside DNF.

sudo vboxmanage extpack uninstall "Oracle VirtualBox Extension Pack"

Verify the system-wide Extension Pack state with the same elevated wrapper.

sudo vboxmanage list extpacks

Expected output:

Extension Packs: 0

Then remove the host package and the akmod source package together.

sudo dnf remove VirtualBox akmod-VirtualBox -y

Confirm that DNF removed both packages.

rpm -q VirtualBox akmod-VirtualBox

Expected output:

package VirtualBox is not installed
package akmod-VirtualBox is not installed

VirtualBox removal does not delete the optional vboxusers group. If no account on this Fedora system still needs USB passthrough through VirtualBox, remove your membership and then delete the unused group.

sudo gpasswd -d $USER vboxusers
sudo groupdel vboxusers
getent group vboxusers || echo none

Expected output after cleanup:

none

Package removal leaves per-user data behind. Check which VirtualBox paths exist in your home directory before deleting anything, then remove only the paths you no longer need.

find "$HOME" -maxdepth 3 \( -path "$HOME/.config/VirtualBox" -o -path "$HOME/VirtualBox VMs" \)

If that command prints nothing, there is no per-user VirtualBox data left for that account. The default configuration path is usually ~/.config/VirtualBox, and the default machine folder stays ~/VirtualBox VMs if you created VMs. Delete the VM directory only after you confirm that you no longer need those disk images.

If RPM Fusion was only there for VirtualBox and you do not use it for codecs, drivers, Steam, or any other package, remove the release package and check whether any RPM Fusion repo files still exist.

sudo dnf remove rpmfusion-free-release -y
ls /etc/yum.repos.d/rpmfusion*.repo 2>/dev/null || echo none

A clean removal prints none. If the listing still shows RPM Fusion repo files, those came from other RPM Fusion subrepositories you enabled earlier on the system, so review them separately instead of assuming the VirtualBox workflow created them.

VirtualBox on Fedora FAQ

Is VirtualBox in Fedora’s default repositories?

No. Fedora 43 uses RPM Fusion Free for the working host package. Oracle’s own Fedora repository is available upstream, but its current build fails to compile a usable vboxdrv module on Fedora’s 6.19 kernel line.

Why does VirtualBox show Kernel driver not installed (rc=-1908) on Fedora?

That error means the host modules for your current kernel are missing or unloaded. Make sure VirtualBox, akmod-VirtualBox, and the matching kernel-devel package are installed, then run sudo akmods --kernels $(uname -r) and sudo systemctl restart vboxdrv.

Can I use Oracle’s Extension Pack with the RPM Fusion build of VirtualBox?

Yes. Match the base VirtualBox version only, such as 7.2.6, and use sudo vboxmanage for installation and verification because Extension Packs are managed system-wide.

Can Fedora guests install Guest Additions with DNF?

Yes. Inside a Fedora guest, install virtualbox-guest-additions with DNF, then reboot the guest so display resizing, clipboard integration, and shared folders pick up the new drivers.

Conclusion

VirtualBox is running on Fedora through RPM Fusion, with the host modules built for the current kernel and a clean path to the Extension Pack or Fedora guest additions when you need them. If full desktop VMs feel heavier than the job at hand, install Docker on Fedora for container workloads instead.

Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffee Buy me a coffee

Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: