Oracle VirtualBox is a powerful virtualization tool that allows you to run multiple operating systems on a single machine. If you're a Fedora user looking to install VirtualBox, you're in the right place. This guide will walk you through the process of installing VirtualBox on Fedora Linux.
Table of Contents
Install Oracle VirtualBox on Fedora 40 and Older Versions
1. Update Your System
Before installing any new software, it's crucial to ensure your system is up-to-date. This step helps avoid compatibility issues and ensures you have the latest security patches.
sudo dnf -y upgrade sudo reboot
2. Install Required Dependencies
VirtualBox requires the following dependencies to function correctly. Install these dependencies using the following commands:
sudo dnf -y install @development-tools sudo dnf -y install kernel-headers kernel-devel dkms elfutils-libelf-devel qt5-qtx11extras
3. Import the VirtualBox GPG Key
Importing the VirtualBox GPG key ensures the integrity and authenticity of the software you're about to install:
sudo rpm --import https://www.virtualbox.org/download/oracle_vbox_2016.asc
4. Add the VirtualBox Repository
To ensure you get the latest version of VirtualBox, add the official VirtualBox repository to your system:
sudo wget -P /etc/yum.repos.d/ https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
5. Install VirtualBox
Now, you're ready to install VirtualBox. Run the following command to install the latest version (VirtualBox 7.1 at the time of writing):
sudo dnf install VirtualBox-7.1
6. Add Your User to the vboxusers
Group
To allow your user account to manage VirtualBox VMs, add it to the vboxusers
group:
sudo usermod -aG vboxusers $USER
7. Reboot Your System
Finally, reboot your system to apply all the changes:
sudo reboot
8. Starting VirtualBox
After rebooting, you can start VirtualBox from your system menu or by running the following command in the terminal:
virtualbox
When VirtualBox is launched for the first time, you will be prompted to choose your experience mode. It offers two modes namely Basic and Expert.
The Basic Mode is intended for a users who are not interested in advanced functionality and prefer a simpler, cleaner interface. And the Expert Mode is intended for experienced users who wish to utilize all VirtualBox functionality.
Choose the mode that you want to apply. You can change this later either from the Global Preferences or the Machine Settings windows.
Congratulations! Oracle VirtualBox 7.1 is ready to use in Fedora Linux.
9. Install Extension Pack
For additional features like USB support, you should install the VirtualBox Extension Pack. Download the Extension Pack for 7.1 version from the VirtualBox Downloads page using command:
wget https://download.virtualbox.org/virtualbox/7.1.0/Oracle_VirtualBox_Extension_Pack-7.1.0.vbox-extpack
Install it using the following command:
sudo VBoxManage extpack install Oracle_VirtualBox_Extension_Pack-7.1.0.vbox-extpack
Press 'y' and hit ENTER key to agree the license terms and install the extension pack.
You can verify if the extension pack is installed from command line using command:
sudo VBoxManage list extpacks
Sample Output:
Extension Packs: 1 Pack no. 0: Oracle VirtualBox Extension Pack Version: 7.1.0 Revision: 164728 Edition: Description: Oracle Cloud Infrastructure integration, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe, full VM encryption. VRDE Module: VBoxVRDP Crypto Module: VBoxPuelCrypto Usable: true Why unusable:
Alternatively, you can verify it from the VirtualBox interface as well. To do so, open VirtualBox manager and go to Files -> Tools -> Extension Package Manager.
You should see the installed extension packs here.
That's it. The extension pack for VirtualBox is installed and loaded.
Manually Installing Oracle VirtualBox in Fedora 41 Beta
In Fedora Linux 41 Beta version, the repository-based installation will not work. If you're on Fedora 41, you need to manually download the Virtualbox RPM file and install it using dnf
command.
Update your Fedora 41 system, install the necessary pre-requisites and import the VirtualBox key as mentioned in the Step 1, Step 2 and Step 3 above.
1. Download the Latest VirtualBox RPM file:
Once you have done the above steps, download the latest VirtualBox from the Oracle VirtualBox Downloads page.
wget https://download.virtualbox.org/virtualbox/7.1.0/VirtualBox-7.1-7.1.0_164728_fedora40-1.x86_64.rpm
2. Install the downloaded RPM file:
sudo dnf install VirtualBox-7.1-7.1.0_164728_fedora40-1.x86_64.rpm
3. Add your User to vboxusers Group:
sudo usermod -aG vboxusers $USER
4. Reboot your system:
sudo reboot
Conclusion
As you can see, Installing VirtualBox on Fedora is a straightforward process. By following the steps outlined in this guide, you can easily set up VirtualBox and start running multiple operating systems on your Fedora machine.
Related Read:
3 comments
This doesn’t work in Fedora 41.
We tested it on Fedora 41 and it does work as described in the guide. Post your error message. We will try to help.
Kernel Driver not installed:
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
‘/sbin/vboxconfig’
as root.
If your system has EFI Secure Boot enabled you may also 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.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) – The support driver is not installed. On linux, open returned ENOENT
Then, when running that command:
$ sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
vboxdrv vboxnetflt vboxnetadp
See the documentation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Signing VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use ‘dmesg’ to find out why.
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.
dmesg command shows:
[ 9.552995] systemd-sysv-generator[806]: SysV service ‘/etc/rc.d/init.d/livesys’ lacks a native systemd unit file, automatically generating a unit file for compatibility.
[ 9.552999] systemd-sysv-generator[806]: Please update package to include a native systemd unit file.
[ 9.553002] systemd-sysv-generator[806]: ! This compatibility logic is deprecated, expect removal soon. !
[ 9.553040] systemd-sysv-generator[806]: SysV service ‘/etc/rc.d/init.d/livesys-late’ lacks a native systemd unit file, automatically generating a unit file for compatibility.
[ 9.553043] systemd-sysv-generator[806]: Please update package to include a native systemd unit file.
[ 9.553045] systemd-sysv-generator[806]: ! This compatibility logic is deprecated, expect removal soon. !
[ 9.553836] systemd-sysv-generator[806]: SysV service ‘/etc/rc.d/init.d/vmware-USBArbitrator’ lacks a native systemd unit file, automatically generating a unit file for compatibility.
[ 9.553840] systemd-sysv-generator[806]: Please update package to include a native systemd unit file.
[ 9.553842] systemd-sysv-generator[806]: ! This compatibility logic is deprecated, expect removal soon. !
[ 9.554049] systemd-sysv-generator[806]: SysV service ‘/etc/rc.d/init.d/vmware’ lacks a native systemd unit file, automatically generating a unit file for compatibility.
[ 9.554052] systemd-sysv-generator[806]: Please update package to include a native systemd unit file.
[ 9.554054] systemd-sysv-generator[806]: ! This compatibility logic is deprecated, expect removal soon. !
[ 688.743286] Loading of module with unavailable key is rejected