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

215 Comments

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

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

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

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

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

    Reply
  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

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

      I think that’s what made the biggest difference

      Reply
  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 ./VBoxLinuxAdditions.run’ and it worked fine and I have full screen and mouse pointer integration now

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

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

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

    Reply

Submit a Comment

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