VirtualBox 5.0 Installation on Fedora

Fedora doesn't have VirtualBox in its repositories. It can be installed either from RPM Fusion repository or from the official VirtualBox one. The second option is described in this document.

June 30, 2016

VirtualBox Repository

More info can be found on VirtualBox Download Page and VirtualBox User Manual.

Create a text file named virtualbox.repo in /etc/yum.repos.d/ directory with the repository specification.

$ cd /etc/yum.repos.d
$ sudo nano virtualbox.repo

Paste the following code.

name=Fedora $releasever - $basearch - VirtualBox

Or just download the repo file into the directory.

# wget -P /etc/yum.repos.d/


Now we can install VirtualBox from the new repository.


Install dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next kernel update. Next we need kernel-headers package and kernel-devel package, otherwise the installation fails (more info in VirtualBox manual).

$ sudo dnf install dkms
$ sudo dnf install kernel-headers
$ sudo dnf install kernel-devel


Find the latest version of VirtualBox. Either from our repository or from the Downloads section on VirtualBox website.

$ sudo dnf search VirtualBox

Install the latest VirtualBox package (currently 5.0).

$ sudo dnf install VirtualBox-5.0

Needed kernel modules are build and vboxusers group is created during installation.

Sometimes it's useful to know how to rebuild kernel modules. There are four commands with the same effect, the first one is the official one.

# rcvboxdrv setup
# /usr/lib/virtualbox/ setup
# /etc/init.d/vboxdrv setup
# service vboxdrv setup

Add user to vboxusers group. The user must log out and then log back in.

# usermod -a -G vboxusers david


Download VirtualBox Extension Pack from VirtualBox Downloads page. Install it in VirtualBox 'File' > 'Preferences...' > 'Extensions'