VirtualBox Guest Additions on Fedora 24/23, CentOS/RHEL 7.2/6.8/5.11

virtualbox-logo-smallThis is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 24/23/22/21/20/19/18/17/16, CentOS 7.2/6.8/5.11, Red Hat (RHEL) 7.2/6.8/5.11.

VirtualBox Guest Additions is special software that can be installed inside Linux virtual machines to improve performance and make integration much more seamless. Among the features provided by these VirtualBox Guest Additions are mouse pointer integration and arbitrary screen solutions (e.g. by resizing the guest window).

Install VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL)

1. Change root user

2. Make sure that you are running latest kernel

Update virtual machine kernel and reboot

3. Mount VirtualBox Guest Additions

Click Devices > Install Guest Additions… on VirtualBox
VirtualBox Install Guest Additions

Mount VirtualBox Guest Additions device

4. Install following packages

On CentOS/Red Hat (RHEL) 7/6/5, EPEL repo is needed

Install following packages

If you have CentOS/RHEL 6.7 then check this comment. You need older kernel.

5. Add KERN_DIR environment variable

6. Install Guest Additions

Output looks like following:

7. Reboot guest system

Then VirtualBox Guest Additions install is ready.

Check also:

Install VirtualBox (with yum) on Fedora, CentOS, Red Hat (RHEL)

Share this post


  1. It successfully works on fedora 24. Appreciate your good sharing!

    • Worked for me too on Fedora24! Can’t believe all these steps have to be performed for something so basic in 2016.

  2. Thanks….instructions worked fine…..thanks for sharing…

  3. Using virtual box 4.3.20 building main Guest Additions module failed for Fedora 24 guest. Installation of latest version Guest Additions (5.1.0) passed but automatic adjustment of video resolution still not working. Any ideas? Unfortunately I’m not allowed to update virtual box.

    • Same here did not try –refresh and old kernel still works

  4. I get warnings and errors after following all the steps:

    Building the main Guest Additions module [FAILED]

    (In /var/log/vboxadd-install.log:)
    Error! Bad return status for module build on kernel: 4.6.4-301.fc24.x86_64 (x86_64)

    Warning: unknown version of the X Window System installed. Not installing X Window System drivers.

    I had just done a dnf update and restarted the virtual machine after a previous failed attempt to install the guest additions using someone else’s walk through. If someone would be nice enough to help me I’ll provide more relevant info, I don’t know what’s important to post and what’s not at this point.

  5. Fedora 24
    Worked for me after several tries.

    Installed these packages first
    1) dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl

    update all packages
    2) dnf upgrade –refresh
    3) reboot

    update the kernel
    4) dnf update kernel*

    5) mount the guestAdddition.iso as per above
    6) make the KERN_DIR environment variables as per above
    7) run the installer as per above

    • Update to 1) make sure to add the actual kernel version
      dnf install gcc kernel-devel-4.6xxx

      I think that’s what made the biggest difference

      • Hello paul,

        First update your kernel on step 2.

        Then it should install right kernel-devel and kernel-headers, (currently 4.7.7), VBox Guest Additions 5.1.6 have some bug, but 5.1.4 should work normally.

  6. Thanks for the help. I have installed GuestAdditions in Fedora 20 after trying for over 6 Hours.. All commands worked well but the last command did not work. I added ‘sudo ./’ and it worked fine and I have full screen and mouse pointer integration now

  7. Paul Costa’s fix worked perfectly for my Mac host fedora 24 guest on kernel 4.6.4 two weeks ago, but when I tried the same thing on my Linux mint host, fedora 24 guest kernel 4.6.6 today nothing seems to work at all. I still need to see if the problem is the difference in the host or a difference in the Kernel…I would really like to get it working on my mint machine to better try out fedora 24.

  8. Thanks for the info. Works smoothly on CentOS 7.

  9. Thanks. Works with Fedora 25 Alpha, too.

    • Paul Costa put me on the right track. I did not see his follow up comment the first time around. It would be good to consider upgrading the main post for Fedora 24 because what is described clearly does not work.

      I am shocked how difficult this was compared to Linux Mint. Finally this is the exact sequence that got it to work for me:

      1) dnf install gcc dkms make bzip2 perl
      2) uname -r
      > 4.5.5-300.fc24.x86_64
      3) sudo dnf install kernel-devel-4.5.5-300.fc24.x86_64 kernel-headers-4.5.5-300.fc24.x86_64
      4) reboot
      5) Install guest tools

      • Hello Mark and Benjamin,

        I can run VBoxGuestAdditions version 5.1.4, with 4.7.7 kernel without problems, but 5.1.6 version with 4.7.7 kernel fail. So maybe it’s better install latest kernel and downgrade your VBox Guest Additions to 5.1.4. I guess that next release will fix this.


Submit a Comment

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