Install VirtualBox Guest Additions on CentOS

The guest additions of VirtualBox require DKMS (Dynamic Kernel Module Support). After every kernel update the modules for VirtualBox are automatically built. Therefore we need to install dkms which is outside the default repository, but in the EPEL (Extra Packages for Enterprise Linux) repository.

Install it

# yum install epel-release 
# yum install dkms

Mount the additions ISO and install it.

# mkdir -p /media/cdrom 
# mount -o loop /dev/cdrom /media/cdrom 
# /media/cdrom/VBoxLinuxAdditions.run