Tuesday, November 22, 2016

CentOS 7 - install VirtualBox Guest Additions

With a fresh CentOS VM up and running in VirtualBox, our next step was to add in GuestAdditions. But, it failed.  Unlikc the install on Ubuntu, CentOS kicked back with this message:


       

The gcc utility was not found. If the following module compilation fails
then this could be the reason and you should try installing it.
The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason. The missing package can be probably installed with yum install kernel-devel-3.10.0-327.el7.x86_64
Building the main Guest Additions module[FAILED] (Look at /var/log/vboxadd-install.log to find out what went wrong)Doing non-kernel setup of the Guest Additions[  OK  ]Press Return to close this window...^CSignal caught, cleaning upPress Return to close this window...

Fortunately, the answer has already been posted.
You can find it here:  How To Install VirtualBox 5 Additions on CentOS 7.

In summary, the steps were:
  1. $ sudo yum -y update
  2.    reboot
  3. $ sudo yum install epel-release
  4. $ sudo yum install dkms kernel-devel
  5.    install GuestAdditions from CD
    1. via auto-installer, or
    2. terminal
      1. $ cd /run/media/<yourid>/VBOXADDITIONS_x_x_x_xxxxx
      2. $ sudo ./VBoxLinuxAdditions.run
  6.   reboot


No comments: