How To Install VirtualBox 5 Additions on CentOS 7


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


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

$ sudo yum install dkms kernel-devel


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.


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 ./

Be patient and wait for the process to run.


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


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


23 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: 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!!

  10. Elizab3th says:

    Thank you!!

  11. Hell says:

    It works!

  12. Jonathan says:

    I’m not getting the feedback that it installs all of the components for vboxadditions, but I also don’t see a failure. Any help to figure out what is going on?

    • newlife007 says:

      In the post there is a screen shot showing OK for each of the compunents as they were compiled and added, it is not alot. If you see the same output then you are good. After reboot you can run the command ps -ef | grep -i vbox and you should see VBoxClient, VBoxService and VBoxWQueue

    • Joe says:

      I have the same problem. It looks like it runs but I don’t see anything. Let me know if you got this to work.

  13. Wizardre says:

    You’re a Freekin Genius!!! I’ve looked at at least 50 different articles and tried everything I could find but this finally did the trick!!!

  14. Edwin says:

    I am starting to mess around more with Linux. This was a problem for me and I tried several things. Finally, this setup worked! I realize this post is from 2015 and it is still helping out. Thank you!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.