I found installing VirtualBox guest additions to be more of a challenge than with Ubuntu/Debian, mainly due to some extra packages required and some Kernel variables – here is how I do it:
- Make sure everything is updated
- Update the kernel
yum update kernel*
- Install the some packages required for the guest additions
yum install gcc kernel-devel kernel-headers
- Configure the KERN_DIR variable. * you may need to reboot, or it might be a good idea if you do just to be sure.
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` export KERN_DIR
- Install guest additions from Devices Menu on Virtual Box: Devices > Install Guest Additions
- Click OK to open the Autorun Prompt and click Run then the root password and the guest additions should install successfully. Reboot the system and verify everything is running.