Installing VirtualBox Guest Additions on CentOS


VirtualBox CentOS

If for any reason you need to install CentOS on a virtual machine using VirtualBox and you want to take advantage of the extras features provided by the Guest Additions (network and graphic drivers, for enabling full screen and mouse integration options) you can follow these steps::

  • In the virtual machine with CentOS install the needed files for compiling the Guest Additions:
yum install kernel-headers kernel-devel
yum groupinstall "Development Tools"

This will take long because it downloads a lot of packages.

  • Select Guest Additions on VirtualBox menu.

VirtualBox Guest Additions CentOS

On the virtual machine a link will be created to mount the CDROM. Right click on it and choose Mount. Once mounted go to:

cd /media/VBOXADDITIONS_4.1.20_80170/

There run the binary file for Linux installation:

./VBoxLinuxAdditions.run

Once it had finished the Guest Additions will be installed on Fedora!

Installing on Red Hat

The above steps are valid for Red Hat, you only need to set a repository from where packages and group of packages will be downloaded.

,

  1. #1 by Luis Gallardo on 25/01/2013 - 5:55 pm

    @Admin_D Thanks for dropping by and share your experience. The “Development Tools” includes all the needed to compile a kernel and its modules (it’s not enough to install gcc,dkms and make), and in fact VirtualBox’s GuestAddtions builds a module in the process. Best regards!

  2. #2 by Admin_D on 25/01/2013 - 5:17 pm

    Luis,
    Thank you for your blog. I have been struggling trying to get guest additions working on CentOS 6.3. Was getting the error “Kernel configuration is invalid”. Searched all over the web for the solution. Many people are having the same problem but you are the only one that I found that had the solution. Everyone list the dependencies as only “gcc kernel-devel kernel-headers dkms make” including Oracle themselves. The solution is groupinstall “Development Tools”. As soon as I installed it VB guest additions installed with no problem. Thanks a lot.

(will not be published)