
Running multiple operating systems on a single machine is something every Linux developer and sysadmin ends up needing sooner or later. Whether you are testing a new server configuration, running a Windows app for a client, or spinning up an isolated lab environment, virtualization makes it possible without buying extra hardware. VirtualBox is one of the most popular tools for this job, but getting it to run properly on Fedora 43 takes more than a single dnf install command. Fedora’s fast kernel release cycle, Secure Boot enforcement, and SELinux policies introduce a few friction points that catch people off guard.
This guide shows you exactly how to install VirtualBox on Fedora 43 from start to finish. You will cover kernel preparation, dependency setup, the actual install, Secure Boot module signing, user group configuration, and the Extension Pack. Each step includes an explanation of what is actually happening under the hood, not just a command to copy and paste.
Who Should Read This Guide
This tutorial is written for beginner to intermediate Linux users, developers, and sysadmins who want to run virtual machines on Fedora 43 Workstation. You do not need to be a kernel expert, but you should be comfortable opening a terminal and running commands with sudo.
If you are completely new to Linux, bookmark this and come back after you have spent a few weeks on the command line. If you have used Fedora before and just need VirtualBox working, you are in the right place.
Prerequisites
Before you type a single command, make sure these conditions are met. Skipping any one of them will cause the install to fail partway through.
- Fedora 43 Workstation installed and booted
- A user account with sudo privileges — the full install requires root-level access for package management, kernel module compilation, and group changes
- Active internet connection — you will download packages from both the Fedora repositories and Oracle’s official VirtualBox site
- At least 4 GB of RAM on the host machine — VirtualBox itself needs a minimum of 2 GB, and each guest VM you create will consume additional memory
- 50 GB or more of free disk space — guest VM disk images can grow large quickly
- Hardware virtualization enabled in BIOS/UEFI — look for VT-x (Intel) or AMD-V (AMD) in your firmware settings; without it, 64-bit guest operating systems will not run
- Basic UEFI/Secure Boot awareness — Fedora 43 ships with Secure Boot enabled on most hardware; this affects how VirtualBox kernel modules load
Understanding Why VirtualBox Needs Special Handling on Fedora 43
Before jumping into steps, take two minutes to understand what makes VirtualBox different from most other software you install on Fedora.
VirtualBox is not just a regular application. It ships with kernel modules, which are small compiled programs that plug directly into the Linux kernel to control low-level hardware like CPU virtualization, network interfaces, and USB controllers. The four modules are vboxdrv, vboxnetadp, vboxnetflt, and vboxpci.
The critical problem is this: Linux kernel modules must be compiled against the exact version of the kernel they will run on. Fedora 43 updates its kernel frequently. Every time a new kernel lands via dnf upgrade, any previously compiled VirtualBox modules become incompatible with the new kernel and refuse to load.
This is why the install process involves DKMS (Dynamic Kernel Module Support), a framework that automatically recompiles VirtualBox modules whenever the kernel updates. Without DKMS in place, your VMs will break after every routine system update.
On top of that, Fedora 43 enforces Secure Boot by default. Secure Boot requires every kernel module to carry a trusted digital signature before the firmware allows it to load. VirtualBox modules compiled on your local machine are unsigned by default, so they get rejected at boot time. You will handle this with a Machine Owner Key (MOK) enrollment process later in this guide.
Step 1: Upgrade the Fedora 43 Kernel
Why do this first? VirtualBox compiles its kernel modules against the kernel headers installed on your system. If your running kernel and your installed headers are from different versions, the module build will fail with a confusing mismatch error. Upgrading the kernel and rebooting first ensures everything lines up cleanly before you install a single dependency.
Run the following command:
sudo dnf upgrade kernel
After the upgrade completes, reboot your machine immediately:
sudo reboot
Do not skip the reboot. Linux does not hot-swap kernels. The new kernel only becomes active after a restart.
After booting back in, confirm the active kernel version:
uname -r
Expected Output
6.12.0-300.fc43.x86_64
Keep this version string in mind. You will use it to verify that your kernel headers match in the next step.
Step 2: Install VirtualBox Build Dependencies
Why install these packages? VirtualBox does not ship pre-compiled kernel modules in its RPM. Instead, it compiles them fresh on your machine at install time using your system’s compiler and kernel headers. Every package in this list has a specific role in that compilation process. Missing even one of them causes the build to fail silently, leaving you with a VirtualBox install that opens but refuses to start any VMs.
Install all dependencies in a single command:
sudo dnf install gcc kernel-headers kernel-devel dkms binutils make patch libgomp glibc-headers glibc-devel
Here is what each package does:
- gcc — the GNU C compiler; VirtualBox modules are written in C and need this to build
- kernel-headers — provides the header files that tell the compiler about the running kernel’s internal interfaces
- kernel-devel — the full kernel development tree; required to compile modules against your specific kernel version
- dkms — registers VirtualBox with the DKMS framework so modules auto-rebuild after kernel updates
- binutils — a collection of binary tools including the linker, needed during the final module linking stage
- make — the build automation tool that orchestrates the multi-file compilation
- patch — applies any upstream source-level fixes during the build process
- libgomp — the GNU OpenMP library; some VirtualBox components use parallel processing and require this at runtime
- glibc-headers / glibc-devel — the C standard library headers; any C program compiled on Linux, including VirtualBox modules, links against these
After the install completes, run a quick sanity check:
rpm -q kernel-devel-$(uname -r)
Expected Output
kernel-devel-6.12.0-300.fc43.x86_64
If you see package kernel-devel-[version] is not installed, run:
sudo dnf install kernel-devel-$(uname -r)
The $(uname -r) syntax automatically substitutes your running kernel version, so this command always installs the exact matching headers.
Step 3: Download VirtualBox from Oracle’s Official Site
Why download from Oracle directly instead of a Fedora repository? Oracle controls the VirtualBox release cycle independently from Fedora’s package maintainers. The official Oracle RPM is always the most current stable release, comes with proper systemd service integration, and is built specifically for Fedora’s RPM-based package system. Third-party repositories may lag weeks behind official releases.
Download via Browser
- Open your browser and go to
https://www.virtualbox.org/wiki/Downloads - Under Linux distributions, click the Fedora link next to the latest VirtualBox version
- Save the
.rpmfile to your~/Downloadsdirectory
Download via Terminal
If you prefer the terminal, use wget. Replace 7.1.x with the current version number shown on the download page:
cd ~/Downloads
wget https://download.virtualbox.org/virtualbox/7.1.x/VirtualBox-7.1.x-Fedora.rpm
Verify the Checksum
Before installing any executable downloaded from the internet, verify its integrity. Oracle publishes SHA256 checksums on the same download page.
sha256sum VirtualBox-7.1.x-Fedora.rpm
Compare the output with the checksum listed on Oracle’s download page. If they match, the file is intact and untampered. If they do not match, delete the file and download again.
Step 4: Install VirtualBox on Fedora 43 Using DNF
Navigate to the directory where you saved the RPM:
cd ~/Downloads
Install with DNF:
sudo dnf install ./VirtualBox-*.rpm
Why use dnf install instead of rpm -i? DNF automatically resolves and installs any missing runtime dependencies. The rpm command installs only the package you give it, with no dependency resolution. If any dependency is missing, VirtualBox will install but fail at launch with a cryptic library error.
During the installation, DNF will:
- Parse the RPM manifest
- Resolve and pull in any remaining runtime dependencies
- Place VirtualBox binaries in
/usr/bin/ - Register the
vboxdrvsystemd service - Trigger the initial DKMS module build against your running kernel
Verify the install succeeded:
VBoxManage --version
Expected Output
7.1.x
If you see a version number, the binary is in your PATH and the core install worked. If you get command not found, the install did not complete cleanly. Re-run the DNF install command and check for error output.
Step 5: Sign VirtualBox Kernel Modules for Secure Boot
This is the step most guides skip, and it is the number one reason people end up with a VirtualBox install that looks fine but refuses to start any virtual machine.
Why is module signing required? Fedora 43 enables Secure Boot by default on UEFI systems. When Secure Boot is active, the UEFI firmware checks a signature on every kernel module before allowing it to load. VirtualBox modules compiled locally are unsigned. The kernel rejects them with this error:
modprobe: ERROR: could not insert 'vboxdrv': Key was rejected by service
You can confirm Secure Boot is the cause by checking the kernel log:
sudo dmesg | grep "Loading of unsigned"
If you see lines like Loading of unsigned module is rejected, Secure Boot is blocking the modules.
Fix: Use RPMFusion and Akmods (Recommended)
The cleanest solution for Fedora users is to use the akmods package from RPMFusion. Akmods handles both the module build and the signing automatically.
Step 5a: Enable the RPMFusion Free repository:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
Why RPMFusion? RPMFusion maintains a version of VirtualBox that comes pre-configured to work with akmods, which handles Secure Boot signing as part of the install process.
Step 5b: Start the akmods service to generate signing keys:
sudo systemctl start akmods.service
This generates a local key pair stored in /etc/pki/akmods/certs/.
Step 5c: Enroll the public key with mokutil:
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
You will be prompted to set a MOK enrollment password. Choose something you will remember for the next 60 seconds.
Step 5d: Reboot and complete MOK enrollment:
sudo reboot
During the next boot, your UEFI firmware will display a blue MOK management screen. Select Enroll MOK, then Continue, enter your password when prompted, and select Reboot.
Why does this require a reboot? The UEFI firmware reads its trusted key database only during the pre-boot phase. Changes to the MOK database take effect only on the next boot cycle.
Step 5e: After reboot, start and enable the VirtualBox kernel driver:
sudo systemctl start vboxdrv
sudo systemctl enable vboxdrv
Verify the modules loaded correctly:
lsmod | grep vbox
Expected Output
vboxnetadp 32768 0
vboxnetflt 40960 0
vboxdrv 708608 2 vboxnetadp,vboxnetflt
Seeing all three modules in the output means Secure Boot accepted the signed modules and VirtualBox is fully operational at the kernel level.
Step 6: Add Your User to the vboxusers Group
Installing VirtualBox and loading its kernel modules is not enough to use all its features. You also need to grant your user account permission to access the hardware resources that VirtualBox manages.
Why is this group membership required? VirtualBox uses a dedicated Unix group called vboxusers to control access to low-level hardware: USB controllers, host network interfaces, and shared folder services. Without group membership, VirtualBox starts but immediately shows USB errors and blocks USB device passthrough to guest VMs.
Add your current user to the group:
sudo gpasswd -a $USER vboxusers
The $USER variable automatically uses your current username, making the command work on any machine without modification.
Reboot to apply the group change:
sudo reboot
Why reboot instead of just logging out? Linux assigns group memberships to your session token at login time. A new group does not propagate into an active session. Rebooting ensures the new membership takes effect cleanly across all processes.
After the reboot, verify your group membership:
groups $USER
You should see vboxusers in the output alongside your other groups. If it is missing, the gpasswd command did not execute correctly. Re-run it and reboot again.
Step 7: Install the VirtualBox Extension Pack
The base VirtualBox installation supports USB 1.1 only. For anything modern, you need the VirtualBox Extension Pack.
Why is the Extension Pack separate from the main install? Oracle licenses the core VirtualBox application under the open-source GPL license. The Extension Pack includes patented features and is distributed under Oracle’s proprietary PUEL (Personal Use and Evaluation License). It is free for personal use, but requires a commercial license for business use. Keeping them separate lets Oracle maintain different licensing terms.
What the Extension Pack adds:
- USB 2.0 and USB 3.0 device passthrough
- VirtualBox Remote Desktop Protocol (VRDP) for remote VM access
- NVMe and Intel PXE boot support
- Host webcam passthrough
- Disk image encryption
Download the Extension Pack
Go to https://www.virtualbox.org/wiki/Downloads and download the “VirtualBox Extension Pack — All supported platforms” file.
Critical: The Extension Pack version must match your installed VirtualBox version exactly. A version mismatch causes a hard install failure with no clean recovery path.
Install via CLI
sudo VBoxManage extpack install ./Oracle_VirtualBox_Extension_Pack-*.vbox-extpack
Confirm the installation:
VBoxManage list extpacks
Expected Output
Extension Packs: 1
Pack no. 0: Oracle VirtualBox Extension Pack
Version: 7.1.x
...
Usable: true
The Usable: true line confirms the Extension Pack is active and its version matches the installed VirtualBox binary.
Verifying the Complete Installation
Before you create your first VM, run through this checklist to confirm every component is working:
# Check VirtualBox version
VBoxManage --version
# Confirm kernel modules are loaded
lsmod | grep vbox
# Confirm Extension Pack is active
VBoxManage list extpacks
# Launch the VirtualBox GUI
VirtualBox
If the VirtualBox Manager window opens without any error dialogs, every piece of this setup is working correctly.

Troubleshooting Common VirtualBox Errors on Fedora 43
Error 1: modprobe: ERROR: could not insert ‘vboxdrv’
Cause: Secure Boot is blocking unsigned kernel modules, or the kernel-devel version does not match the running kernel.
Fix: Confirm module signing is complete with lsmod | grep vbox. If nothing shows, re-run the akmods and mokutil steps from Step 5. Verify kernel-devel matches your running kernel with rpm -q kernel-devel-$(uname -r).
Error 2: USB Controller Not Accessible
Cause: The current user is not a member of the vboxusers group, or the session has not refreshed after the group was added.
Fix: Re-run sudo gpasswd -a $USER vboxusers and reboot the machine.
Error 3: Kernel Headers Mismatch During DKMS Build
Cause: After a kernel upgrade, kernel-devel was not updated to match the new kernel version.
Fix:
sudo dnf install kernel-devel-$(uname -r)
sudo /sbin/vboxconfig
The second command manually triggers a fresh DKMS module build against the currently running kernel.
Error 4: VirtualBox Stops Working After a Kernel Update
Cause: DKMS failed to rebuild modules for the new kernel automatically, which sometimes happens when kernel-devel headers were not available at upgrade time.
Fix:
sudo /sbin/vboxconfig
Run this any time VirtualBox breaks after a dnf upgrade. It forces a complete module rebuild.
Error 5: SELinux Denials Blocking VirtualBox
Cause: SELinux is preventing VirtualBox from accessing certain system resources.
Diagnosis:
sudo ausearch -m avc -ts recent | grep vbox
Fix for testing (temporary):
sudo setenforce 0
Fix for production (generate a targeted SELinux policy):
sudo ausearch -m avc -ts recent | audit2allow -M vboxpolicy
sudo semodule -i vboxpolicy.pp
Never leave setenforce 0 in place permanently on a production machine. Generate a proper SELinux policy module instead.
Keeping VirtualBox Updated on Fedora 43
Oracle releases VirtualBox updates regularly. These patches fix security vulnerabilities, resolve kernel compatibility issues that appear after Fedora kernel updates, and add support for new guest operating systems.
To update, download the latest RPM from https://www.virtualbox.org/wiki/Downloads and re-run:
sudo dnf install ./VirtualBox-[newversion]-Fedora.rpm
DNF detects the existing installation and performs an upgrade rather than creating a duplicate install. Always update the Extension Pack immediately after upgrading VirtualBox. A version mismatch between the two causes VM startup failures.
Congratulations! You have successfully installed VirtualBox. Thanks for using this tutorial for installing VirtualBox on Fedora 43 Linux system. For additional help or useful information, we recommend you check the VirtualBox website.