VirtualBox Guest Additions on Fedora 29/28, CentOS/RHEL 7.5/6.10/5.11 - Comment Page: 11

This is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 29/28/27/26/25/24/23/22/21/20/19/18, CentOS 7.5/6.10/5.11, Red Hat (RHEL) 7.5/6.10/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). Note: Fedora 29/28 have build in VirtualBox Guest Additions, but if you still wan't (some reason) install latest/development/different version...

303 comments on “VirtualBox Guest Additions on Fedora 29/28, CentOS/RHEL 7.5/6.10/5.11 - Comment Page: 11

1 9 10 11 12
    1. Thank you very much, worked well on CentOS 7.

      Reply
    2. Great Post! Thanks for this. Struggled with the setup of the guest additions.

      Greetings from Germany
      ~ Marcel

      Reply
    3. Don´t set KERN_DIR for RHEL 7.4.

      Reply
      • Hi Nathan,

        KERN_DIR with /build directory at the end, should work normally. Just tested it with CentOS 7.4 and updated this guide.

        Reply
    4. Thanks man! You saved my day ;)

      Reply
    5. Also need to check if kernel-devel package is installed. if not KERN_DIR will not have the necessary files to run and installation will fail.

      Reply
      • If you follow this guide, then you should have kernel-devel installed after step 4, right?

        Reply
    6. hie
      whn i reach the final part of

      ./VBoxLinuxAdditions.run

      it says no suchfile or directory so what can i do please help……

      Reply
      • Hi alpha,

        Did you run exactly all commands? Could you try again and post output of following commands, when you are running ./VBoxLinuxAdditions.run:

        pwd
        
        ls -la
        Reply
        • Hi alpha,

          I had the same problem today. I had to update the KERN_DIR variable to:

          KERN_DIR=/usr/src/kernels/`uname -r`/tools/build/

          export KERN_DIR

          Reply
          • Hi Conor,

            This actually is not same thing at all. Btw. what version of VirtualBox / Guest Additions you are running? Because following:

            KERN_DIR=/usr/src/kernels/`uname -r`/build/

            Just build, no tools/build/…Should work, at least with VirtualBox Guest Additions 5.2.8.

            Reply
            • I can confirm that mine is in tools/build (weird?), was having issues getting it work up until now. Thanks for the heads up Conor.

              Reply
              • Hi Robert,

                What is in tools/build?

                /usr/src/kernels/`uname -r`/build/ is not directory at all, but installer create it when it builds guest additions. So tools/build will fail, just tested it:

                [[email protected] ~]# KERN_DIR=/usr/src/kernels/`uname -r`/build
                [[email protected] ~]# export KERN_DIR
                [[email protected] ~]# /run/media/test/VBox_GAs_5.2.19/VBoxLinuxAdditions.run
                Verifying archive integrity... All good.
                Uncompressing VirtualBox 5.2.19 Guest Additions for Linux........
                VirtualBox Guest Additions installer
                Removing installed version 5.2.19 of VirtualBox Guest Additions...
                Copying additional installer modules ...
                Installing additional modules ...
                VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
                VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
                VirtualBox Guest Additions: Starting.
                [[email protected] ~]# 
                [[email protected] ~]# 
                [[email protected] ~]# KERN_DIR=/usr/src/kernels/`uname -r`/tools/build
                [[email protected] ~]# export KERN_DIR
                [[email protected] ~]# /run/media/test/VBox_GAs_5.2.19/VBoxLinuxAdditions.run
                Verifying archive integrity... All good.
                Uncompressing VirtualBox 5.2.19 Guest Additions for Linux........
                VirtualBox Guest Additions installer
                Removing installed version 5.2.19 of VirtualBox Guest Additions...
                Copying additional installer modules ...
                Installing additional modules ...
                VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
                VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
                VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
                VirtualBox Guest Additions: Starting.
                [[email protected] ~]# 
                [[email protected] ~]# 
                [[email protected] ~]# cat /var/log/vboxadd-setup.log
                Building the main Guest Additions module.
                Error building the module:
                /tmp/vbox.0/Makefile.include.header:108: *** The kernel build folder path must end in /build, or the variable KERN_VER must be set.  Stop.
                

                As you can see just build works, but tools/build fail? Or what you mean?

                Reply
    7. Same issue, as others have reported. There is no ‘build’ directory under the /usr/src/kernels/3.10.0-693.21.1.el7.x86_64 directory. There is something missing from the steps

      Reply
      • In my case, not setting KERN_DIR appears to work.

        Reply
        • Hi Al,

          I just tested this on CentOS 7 and both works:

          KERN_DIR=/usr/src/kernels/`uname -r`/build
          export KERN_DIR
          
          ## OR ##
          
          export unset KERN_DIR

          And yes, there is not ‘build’ directory under /usr/src/kernels/3.10.0-693.21.1.el7.x86_64 directory and shouldn’t be, actually GA installer do building on that directory, so it creates/removes it automatically.

          Reply
    8. Fails on Fedora 28 (4.16.6-302.fc28.x86_64) with Virtualbox 5.2.8 (Windows 10).

      Error message: VirtualBox Guest Additions: modprobe vboxsf failed

      Reply
      • Hi Zelda,

        Could you post a full log?

        Reply
        • Tried again today with new version of VirtualBox, 5.2.12 (Windows 10) and a clean F28 VM (4.16.10-300.fc28.x86_64).

          Unsure if I had the same message last time but it says a version of Guest Additions is already installed. Tried forcing it but I will see if I can remove it first and try again. Run output:

          [[email protected] VirtualBoxGuestAdditions]# ./VBoxLinuxAdditions.run
          Verifying archive integrity… All good.
          Uncompressing VirtualBox 5.2.12 Guest Additions for Linux……..
          VirtualBox Guest Additions installer
          This system appears to have a version of the VirtualBox Guest Additions
          already installed. If it is part of the operating system and kept up-to-date,
          there is most likely no need to replace it. If it is not up-to-date, you
          should get a notification when you start the system. If you wish to replace
          it with this version, please do not continue with this installation now, but
          instead remove the current version first, following the instructions for the
          operating system.

          If your system simply has the remains of a version of the Additions you could
          not remove you should probably continue now, and these will be removed during
          installation.

          Do you wish to continue? [yes or no]
          y
          Copying additional installer modules …
          Installing additional modules …
          VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
          VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
          VirtualBox Guest Additions: Starting.
          VirtualBox Guest Additions: modprobe vboxsf failed

          Reply
          • Hi Zelda,

            Fedora 28 have build in VirtualBox Guest Additions, but this guide still works. You need 5.13 development version for latest 4.16.10 kernel. You can download it here. And then vboxfs module should work.

            Reply
      • This is a known issue. Fedora included the Guest Additions with the release of F28, but the kernel module either didn’t make it in or was broken when it was released (I can’t find the F28 page that has the info now). There is a patched module for vboxsf but it also requires patching the kernel since the base F28 Kernel (any current version) doesn’t like the patched module.

        This is only an issue if F28 is a guest VM and not the host.

        Sorry, but you’ll have to wait for a fix unless you want to try an untested kernel patch that Fedora doesn’t really support.

        Reply
    9. Fedora 28 will fail miserably. The Guest Additions was built into it, but the kernel module didn’t make it into the kernel as it had issues. There’s a fixed module, but you will also need a patched kernel to get it working. Otherwise, you’ll need to wait for RH to get it fixed.

      As for CentOS 7.4, I get the exact same issue with the latest kernel 3.10.862.2.3.el7.

      Reply
    10. Installed not properly :(

      [[email protected] VBOXADDITIONS_5.1.22_115126]# ./VBoxLinuxAdditions.run
      Verifying archive integrity… All good.
      Uncompressing VirtualBox 5.1.22 Guest Additions for Linux………..
      VirtualBox Guest Additions installer
      Removing installed version 5.1.22 of VirtualBox Guest Additions…
      Copying additional installer modules …
      Installing additional modules …
      vboxadd.sh: Starting the VirtualBox Guest Additions.
      Failed to set up service vboxadd, please check the log file
      /var/log/VBoxGuestAdditions.log for details.
      [[email protected] VBOXADDITIONS_5.1.22_115126]#
      [[email protected] VBOXADDITIONS_5.1.22_115126]#
      [[email protected] VBOXADDITIONS_5.1.22_115126]# cat /var/log/VBoxGuestAdditions.log

      vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
      vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
      vboxadd.sh: failed: modprobe vboxguest failed.
      [[email protected] VBOXADDITIONS_5.1.22_115126]#

      Reply
      • Hi Martin,

        You really should upgrade to VirtualBox 5.2?

        Reply
    11. Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again

      Get the above error during step 4 after running rpm -Uvh when trying to run yum install.

      There is a step missing. How do I fix this

      Reply
      • Hi Alex,

        It should work normally, if you have working internet connection.

        What CentOS/RHEL version you are using?

        You can also try following command before yum install command:

        yum clean all
        Reply
      • Thanks Jon,

        I updated this guide.

        Reply
    12. thank you so much I have been hunting for 3 days to fix this issue.

      Reply
    13. I thought I would post this just in case people come here because they have Fedora 28 but shared folders aren’t working – and it’s not clear if the built-in guest additions are working.

      So with Fedora 28 guest, if you set up shared folders in VirtualBox you will find nothing is mounted or shared. This is a known problem: https://bugzilla.redhat.com/show_bug.cgi?id=1576585#c1

      So:
      1. Ensure your Fedora guest os is up to date: sudo dnf update
      2. sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm (or sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-28.noarch.rpm) – you could get version – 28 – from sudo echo $(rpm -E %fedora)
      3. dnf install akmod-VirtualBox
      4. “sudo mount -t vboxsf virtualbox-share-name /media” should now work

      I’ve not been able to get it to automount though.

      Reply
      • Hi Neil,

        Actually this bug isn’t problem with Oracle’s own Guest Additions!

        Please read again bug report!!

        Steps to Reproduce:
        1. do NOT install guest additions from VirtualBox’s ISO (i.e. “Insert Guest additions CD image” in the “Devices” menu)
        2. share a folder
        3. try to mount that folder inside the guest: mount -t vboxsf SHAREDFOLDER /mnt

        This is guide, howto install VirtualBox Guest Additions from Oracles original ISO and in my opinion it’s much better method than use third-party versions, because you get always latest version (no packager delays).

        Reply
    14. Thank you very much. This worked like a charm and mouse integration was activated at the last step even before rebooting but full screen mode came on after the reboot. Thanks again :)

      Reply
1 9 10 11 12

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.

Close