Install VirtualBox 7 on Fedora

This guide will go through how to install VirtualBox 7 on Fedora. Oracle Corporation created VirtualBox, a type-2 hypervisor for x86 virtualization that can be used in both commercial and private environments.

How to Install VirtualBox 7 on Fedora

  • Update and upgrade your system using the command below.
sudo dnf update && sudo dnf upgrade
  • Next, install the dependencies required by running the commands below.
sudo dnf -y install @development-tools
sudo dnf -y install kernel-headers kernel-devel dkms elfutils-libelf-devel qt5-qtx11extras
  • Add VirtualBox repository using the following command.
cat <<EOF | sudo tee /etc/yum.repos.d/virtualbox.repo 
    [virtualbox]
    name=Fedora $releasever - $basearch - VirtualBox
    baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/36/\$basearch
    enabled=1
    gpgcheck=1
    repo_gpgcheck=1
    gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
    EOF
  • Then import the GPG key using the following command.
sudo dnf search virtualbox

Sample output

Fedora  -  - VirtualBox                       83  B/s | 181  B     00:02    
Fedora  -  - VirtualBox                      129  B/s | 1.7 kB     00:13    
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) "
 Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Fedora  -  - VirtualBox                       19 kB/s |  45 kB     00:02    
Last metadata expiration check: 0:00:01 ago on Mon 21 Nov 2022 11:12:46 AM EAT.
==================== Name & Summary Matched: virtualbox =====================
VirtualBox-6.1.x86_64 : Oracle VM VirtualBox
VirtualBox-7.0.x86_64 : Oracle VM VirtualBox
virtualbox-guest-additions.x86_64 : VirtualBox Guest Additions
======================== Summary Matched: virtualbox ========================
RemoteBox.noarch : Open Source VirtualBox Client with Remote Management
fence-agents-vbox.noarch : Fence agent for VirtualBox
libvirt-daemon-driver-vbox.x86_64 : VirtualBox driver plugin for the libvirtd
                                  : daemon
libvirt-daemon-vbox.x86_64 : Server side daemon & driver required to run
                           : VirtualBox guests
  • After importing the GPG key install VirtualBox 7.
sudo dnf install VirtualBox-7.0

Sample output

Dependencies resolved.
=============================================================================
 Package                Arch    Version                    Repository   Size
=============================================================================
Installing:
 VirtualBox-7.0         x86_64  7.0.4_154605_fedora36-1    virtualbox   92 M
Installing dependencies:
 qt5-qttools-common     noarch  5.15.6-1.fc36              updates      11 k
 qt5-qttools-libs-help  x86_64  5.15.6-1.fc36              updates     158 k

Transaction Summary
=============================================================================
Install  3 Packages

Total download size: 92 M
Installed size: 206 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): qt5-qttools-common-5.15.6-1.fc36.noar 7.8 kB/s |  11 kB     00:01    
(2/3): qt5-qttools-libs-help-5.15.6-1.fc36.x  72 kB/s | 158 kB     00:02    
(3/3): VirtualBox-7.0-7.0.4_154605_fedora36- 120 kB/s |  92 MB     13:05    
-----------------------------------------------------------------------------
Total                                        119 kB/s |  92 MB     13:07     
Fedora  -  - VirtualBox                      136  B/s | 1.7 kB     00:12    
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) "
 Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                     1/1 
  Installing       : qt5-qttools-common-5.15.6-1.fc36.noarch             1/3 
  Installing       : qt5-qttools-libs-help-5.15.6-1.fc36.x86_64          2/3 
  Running scriptlet: VirtualBox-7.0-7.0.4_154605_fedora36-1.x86_64       3/3 
  Installing       : VirtualBox-7.0-7.0.4_154605_fedora36-1.x86_64       3/3 
  Running scriptlet: VirtualBox-7.0-7.0.4_154605_fedora36-1.x86_64       3/3 

Creating group 'vboxusers'. VM users must be member of that group!

This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-5.18.6-200.fc36.x86_64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-5.18.6-200.fc36.x86_64

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.

  Verifying        : qt5-qttools-common-5.15.6-1.fc36.noarch             1/3 
  Verifying        : qt5-qttools-libs-help-5.15.6-1.fc36.x86_64          2/3 
  Verifying        : VirtualBox-7.0-7.0.4_154605_fedora36-1.x86_64       3/3 

Installed:
  VirtualBox-7.0-7.0.4_154605_fedora36-1.x86_64                              
  qt5-qttools-common-5.15.6-1.fc36.noarch                                    
  qt5-qttools-libs-help-5.15.6-1.fc36.x86_64                                 

Complete!
  • VirtualBox can be launched using the command below.
virtualbox
  • Alternatively, you can also launch VirtualBox from the application menu.
Install VirtualBox 7 on Fedora
Install VirtualBox 7 on Fedora
  • Sample VirtualBox interface.
Install VirtualBox 7 on Fedora
Install VirtualBox 7 on Fedora
  • That concludes our guide on how to install VirtualBox 7 on Fedora.

Read more about VirtualBox

Other Tutorials

Install OpenSCAP on Debian 11

Install VirtualBox 7 on Debian 11

How to flush DNS cache in Linux

System administrator | Software Developer | DevOps

Leave a Comment