search
top

How To Install VirtualBox 5 Additions on CentOS 7

Introduction

In this post we will discuss how to get VirtualBox 5 guest additions installed on CentOS 7.

Installing VirtualBox Additions

First make sure updates have been applied and if there was a kernel update that the system was rebooted. Do this the typical way by running the command.

$ sudo yum -y update

Now that we have the latest updates and have rebooted we need to install epel to allow us to get some required packages needed for Guest Additions.

$ sudo yum install epel-release

vboxguestaddcentos1

Next we are ready to install dkms and kernel-devel that are required for guest additions to compile.

$ sudo yum install dkms kernel-devel

vboxguestaddcentos2

Install the guest additions. Click Devices > Install Guest Additions CD Image. If you have installed the GUI with CentOS 7 you will receive a popup asking if you want to install VBOXADDITIONS. Click Run and enter in your credentials and the installation will proceed. If you are not using the GUI open a terminal and type the following.

vboxguestaddcentos3

Note: The mount path will have your login id and the VBOXADDITIONS version maybe different. To get the correct path run the mount command.

$ cd /run/media/<yourid>/VBOXADDITIONS_5_0_2_102096

Now we can start the installer. At the terminal type:

$ sudo ./VBoxLinuxAdditions.run

Be patient and wait for the process to run.

vboxguestaddcentos4

Reboot and you will now have all the features that the Guest Additions will give.

Conclusion

And there we have it, you have the VirtualBox guest additions installed and working on your CentOS 7 system.

 

16 Responses to “How To Install VirtualBox 5 Additions on CentOS 7”

  1. Arik says:

    Thanks a lot for this!

  2. Paul says:

    I follow the steps, but cant get this to work. It keeps breaking the system. I get a window with a frown face and a message that says something went wrong.

  3. Paul says:

    After reboot. I am able to enter the encryption password to boot the box, then when it loads i get a frowny face 🙁

    • newlife007 says:

      I did a fresh install of CentOS 7 Server core and was able to install VirtualBox Additions 5.1.2 with no issues except a lag at first boot. Is the VL drive encrypted and if so what encryption did you use, this could be the issue.

      • Paul says:

        So my computer is encrypted, which shouldnt matter I would think. I hadnt encrypted the VirtualBox instance, but I did select encryption during the installation. Should I not encrypt the centos virtual drive?

        • newlife007 says:

          You shouldn’t need to encrypt the virtual system because it is already encrypted by the host OS. I have another system in which the host OS drive is encrypted, let me try a fresh CentOS install on it and see if I get the same error. Not sure if you have used the VirtualBox snapshot feature for before you make the changes but might be good to try.

          • Paul says:

            Is there any certain installation I should be using? I’ve been trying with KDE plasma workspaces.

          • newlife007 says:

            I have just been using Server with GUI and it shouldn’t mater that you are using with KDE Plasma. I am trying to replicate your issue will get back to you soon.

  4. cgimpera says:

    Thanks for this. Totally helpful. Just had to change the new version of the release and had it working in a minute.

  5. Karim R. says:

    Hey, thank you very much for this tutorial, it worked flawlessly! One thing is that it does take a couple restarts then I finally was able to get it to go into fullscreen but other than that, I am very thankful!

    Appreciate it 🙂

  6. A Peterson says:

    Awesome, worked perfectly on CentOS 7 (1511)

  7. Hello, thanks for you post and instructions. One thing, if installing on a minimal install, you also need the bzip2 package (for some reason that is not included in the minimal install).
    I also typically install gcc, but I don’t know if that is required.

  8. mystic says:

    vboxadd.sh: Building Guest Additions kernel modules.
    Failed to set up service vboxadd, please check the log file

  9. Rick Miller says:

    Worked like a charm! Thanks for this post!!

Leave a Reply

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

top