How Do You Troubleshoot Installing Oracle VirtualBox Guest Additions on a CentOS Server?

Problem scenario
You are running Oracle VirtualBox on a Windows host.  You have Linux CentOS guest server.  Guest additions fails to install.  You tried to run this script VBoxLinuxAdditions.run.  The run fails with an error saying "
check /var/log/VBoxGuestAdditions.log for details."

You examined /var/log/VBoxGuestAdditions.log, and it said this:
"vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed."

You have already installed gcc, make, Perl and updated the Linux kernel.  To investigate the kernel you use a "uname -r" command.  You also go to /usr/src/kernels/ and find a directory name that does not match the results of the "uname -r" command.  In /usr/src/kernels/ you execute the "ls" command and find this directory:  3.10.0-514.10.2.el7.centos.plus.i686

You then issue this command:  uname -r
You find this result:  3.10.0-327.el7.i686

Under normal circumstances, these strings match.  What do you do to install Oracle VirtualBox Guest Additions on a Linux CentOS server?

Solution
Reboot the CentOS guest.  After you run "yum update kernel*" the changes (assuming changes were made) will not take effect completely until you reboot.  Then install guest additions.  The errors should go away.

Leave a comment

Your email address will not be published. Required fields are marked *