Install Guest Additions To Fedora

less than 1 minute read

Description:

After installing Fedora on VirtualBox with 3 monitors I was happy with Fedora being main work computer. The issue then became a “virtual box kernel stopped working” on login. This was after I installed the guest additions the first time. I then followed these steps to do it again:

To Resolve:

  1. Change root user:
su
  1. Make sure that you are running latest kernel:
dnf update kernel*

# reboot if it installs a newer kernel

  1. Mount VirtualBox Guest Additions: Click Devices > Install Guest Additions in VB. Open up a terminal and type:
mkdir /media/VirtualBoxGuestAdditions
mount -r /dev/cdrom /media/VirtualBoxGuestAdditions
  1. Install following packages:
dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl
  1. Add KERN_DIR environment variable:
KERN_DIR=/usr/src/kernels/`uname -r`
export KERN_DIR

# for Centos: yum install kernel -devel.x86_64 0:3.10.0-327.el7
yum install kernel -devel -4.2.3-300.fc23.x86_64.rpm
  1. Install Guest Additions:
cd /media/VirtualBoxGuestAdditions
./VBoxLinuxAdditions.run
  1. Reboot guest system:
sudo reboot

References:

“VirtualBox Guest Additions on Fedora 30/29, CentOS/RHEL 8/7/6/5”

Comments