I spent a few installations getting Guest Additions to work within a CentOS VirtualBox. Here is what I did to get things successfully working.
1) Open Console
2) type at prompt> su -
2.a) enter root password
3) type at prompt> yum update kernel*
3.a) type at prompt> reboot
Continued.....
4) Open Console
5) type at prompt> su -
5.a) enter root password
6) type at prompt> yum install gcc kernel-devel kernel-headers dkms make bzip2
Continued....
NOTE: Make sure you are root
Mount Guest Additions
7) type at prompt> cd /media
8) type at prompt> mkdir cdrom
9) type at prompt> mount /dev/scd0 /media/cdrom
9.a) It will give a response stating that it is mounting device in read-only mode.
10) type at prompt> cd /media/cdrom
11) type at prompt> export MAKE='/usr/bin/gmake -i'
11.a) NOTE: the above line fixes the 'OpenGL failed' installation problem
12) type at prompt> ./VBoxLinuxAdditions.run
13) type at prompt> reboot
When doing an upgrade through yum, it will sometimes break the boot process and stall when starting the 'atd' process. I learned that when this happens, just reinstall the Linux Guest Additions via the command line. It kinda sucked to have the boot process stall. But, if you get another screen, you'll be able to log in via command line. On my Mac, I pressed 'fn' + 'command' + 'f2'. This will give you a new log in prompt. I do not know the exact key combinations using a Windows host. Once logged in as root, follow steps 7 through 13 again.
1) Open Console
2) type at prompt> su -
2.a) enter root password
3) type at prompt> yum update kernel*
3.a) type at prompt> reboot
Continued.....
4) Open Console
5) type at prompt> su -
5.a) enter root password
6) type at prompt> yum install gcc kernel-devel kernel-headers dkms make bzip2
Continued....
NOTE: Make sure you are root
Mount Guest Additions
7) type at prompt> cd /media
8) type at prompt> mkdir cdrom
9) type at prompt> mount /dev/scd0 /media/cdrom
9.a) It will give a response stating that it is mounting device in read-only mode.
10) type at prompt> cd /media/cdrom
11) type at prompt> export MAKE='/usr/bin/gmake -i'
11.a) NOTE: the above line fixes the 'OpenGL failed' installation problem
12) type at prompt> ./VBoxLinuxAdditions.run
13) type at prompt> reboot
When doing an upgrade through yum, it will sometimes break the boot process and stall when starting the 'atd' process. I learned that when this happens, just reinstall the Linux Guest Additions via the command line. It kinda sucked to have the boot process stall. But, if you get another screen, you'll be able to log in via command line. On my Mac, I pressed 'fn' + 'command' + 'f2'. This will give you a new log in prompt. I do not know the exact key combinations using a Windows host. Once logged in as root, follow steps 7 through 13 again.