Thursday, September 20, 2012

Installing VirtualBox Linux Guest Additions for CentOS 6.3

To install the VM Guest Additions for VirtualBox 4.1.22 on CentOS 6.3, I worked through the instructions found at http://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest

As detailed at http://wiki.centos.org/AdditionalResources/Repositories/RPMForge we must install RPMforge first, so we can install the DKMS (Dynamic Kernel Module Support) required by the Virtual Box Linux Additions.

The following must be done with root privileges. I logged in as root for this operation.

Install RPMforge

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Install DKMS (Dynamic Kernel Module Support)

yum --enablerepo rpmforge install dkms

Ensure the development environment and kernel source are installed

yum groupinstall "Development Tools"

yum install kernel-devel

Install Guest Additions

In VirtualBox, under the Devices menu, select the VBoxGuestAdditions.iso image for the CD/DVD drive.  The autorun should execute and you should be able to install it from there.  If the autorun does not kick in, go to a terminal prompt and CD to the mountpoint and issue the command:

./VBoxLinuxAdditions.run

image

Once I performed those actions, I logged out of root and logged in under my own account.  The mouse no longer needed to be captured by the virtual machine.  You can resize the Virtual Box window and the CentOS desktop will resize.  Much better.

No comments: