VirtualBox supports a large number of guest operating systems:
Windows 3.xWindows NT 4.0Windows 2000Windows XPWindows Server 2003Windows Server 2008Windows VistaWindows 7Windows 8Windows 8.1Windows 10DOSLinux (2.4, 2.6, 3.0, 3.2, 3.4, 3.10, 3.16, 3.18, 4.1, 4.4, 4.7, 4.8, 4.9, 4.10, 4.11)SolarisOpenSolarisOpenBSDThis guide shows howto install VirtualBox 5.1 (currently 5.1.26) on Fedora 26/25/24/23/22, CentOS 7.3/6.9, Red Hat (RHEL) 7.3/6.9/5.11. This guide uses Virtual Box own yum repositories.
Note: Fedora 21/20/19/18 users can install VirtualBox 5.0, Fedora 17 users can install VirtualBox 4.3 and Fedora 16 users can install VirtualBox 4.2.
Update packages
Bash ## Fedora 26/25/24/23/22 ## dnf update ## Fedora 21/20/19/18/17/16 and CentOS/RHEL 7/6/5 ## yum updateCheck that that you are running latest installed kernel version Output of following commands version numbers should match:
Bash rpm -qa kernel |sort -V |tail -n 1 uname -rNote: If you got kernel update or run older kernel than newest installed then reboot:
Bash rebootCentOS 7/6/5 and Red Hat (RHEL) 7/6/5 needs EPEL repository, install it with following command:
Bash ## CentOS 7 and RHEL 7 ## rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ## CentOS 6 and RHEL 6 ## rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm ## CentOS 5 and RHEL 5 ## rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm Bash ## Fedora 26/25/24/23/22 ## dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms ## Fedora 21/20/19/18/17/16 and CentOS/RHEL 7/6/5 ## yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms ## PAE kernel users install ## ## Fedora 24/23/22 ## dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms ## Fedora 21/20/19/18/17/16 and CentOS/RHEL 7/6/5 ## yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms 5. Install VirtualBox Latest Version 5.1 (currently 5.1.26) Bash ## Fedora 26/25/24/23/22 ## dnf install VirtualBox-5.1 ## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5 ## yum install VirtualBox-5.1Note: This command create automatically vboxusers group and VirtualBox user must be member of that group. This command also build needed kernel modules. Package is VirtualBox-5.1 not VirtualBox.
Rebuild kernel modules with following command:
Bash ## Fedora 26/25/24/23/22/21/20/19 and CentOS/RHEL 7 ## /usr/lib/virtualbox/vboxdrv.sh setup ## Fedora 18/17/16 and CentOS/RHEL 6/5 ## /etc/init.d/vboxdrv setup ## OR ## service vboxdrv setupReplace user_name with your own user name or some another real user name.
Bash usermod -a -G vboxusers user_nameUse launcher from menu or simply run:
Bash VirtualBoxIf you have problems with KERN_DIR parameter or your kernel directory is not automatically detected then set KERN_DIR environment variable manually, using following method:
Bash ## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Fedora example ## KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686 ## CentOS and Red Hat (RHEL) example ## KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64 ## Export KERN_DIR ## export KERN_D