Virtual Box Guest Additions for CentOS 7
When running CentOS in Virtual Box, life is much simpler if the Guest Additions to integrate CentOS with the environment are installed.
However, I have always had problems getting them to install correctly, so I thought I would document the process I have found to work to save anyone else from having issues.
Step 1 – Update CentOS
Run the following commands.
cat <<EOF > vbox.sh
yum -y update
yum -y install epel-release
yum -y groupinstall "Development Tools"
yum -y install kernel-devel
yum -y install epel-release
yum -y install dkms
yum -y update
EOF
chmod +x vbox.sh
sudo ./vbox.sh
Reboot the system
Step 2 – Add Guest Additions
Load the guest additions CD (Devices -> Insert Guest Additions CD Image …)
Open the CD in a terminal and run the following command
sudo ./VBoxLinuxAdditions.run
Reboot the system
Guest additions should now be installed and working