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

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

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

1 10 11 12
    1. Sorry, I tried twice. No luck!

      [[email protected] ~]$ sudo -i
      [[email protected] ~]# dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl
      Last metadata expiration check: 0:49:48 ago on Sun 23 Sep 2018 03:39:52 PM CST.
      Package gcc-7.3.1-6.fc27.x86_64 is already installed, skipping.
      Package kernel-devel-4.18.7-100.fc27.x86_64 is already installed, skipping.
      Package kernel-headers-4.18.7-100.fc27.x86_64 is already installed, skipping.
      Package dkms-2.6.1-1.fc27.noarch is already installed, skipping.
      Package make-1:4.2.1-4.fc27.x86_64 is already installed, skipping.
      Package bzip2-1.0.6-24.fc27.x86_64 is already installed, skipping.
      Package perl-4:5.26.2-407.fc27.x86_64 is already installed, skipping.
      Dependencies resolved.
      Nothing to do.
      Complete!
      [[email protected] ~]# KERN_DIR=/usr/src/kernels/`uname -r`/build
      [[email protected] ~]# export KERN_DIR
      [[email protected] ~]# cd /run/media/thomas/VBox_GAs_5.2.18/
      [[email protected] VBox_GAs_5.2.18]# ./VBoxLinuxAdditions.run
      Verifying archive integrity… All good.
      Uncompressing VirtualBox 5.2.18 Guest Additions for Linux……..
      VirtualBox Guest Additions installer
      Removing installed version 5.2.18 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.
      VirtualBox Guest Additions: modprobe vboxsf failed
      [[email protected] VBox_GAs_5.2.18]#

      Reply
        • Hi JR, I was having the same problem as Thomas. I downloaded the .iso you linked above, and while the setup does run for longer, and gets passed the sharedfolder install stage, it still fails with modprobe vboxsf failed.

          Going to /var/log/vboxaddsetup.log before trying your fix gave a long error, but on the new version all I see is:

          Building the main Guest Additions module.
          Building the shared folder support module.
          Building the graphics driver module.

          Any ideas?

          Thanks,
          Ryan

          Reply
          • Hi Ryan,

            Did you reboot your system after install (step 7.)? It shows error message when it tries to modprobe vboxsf, but after reboot it works for me.

            [[email protected] ~]# uname -a
            Linux localhost.localdomain 4.18.9-200.fc28.x86_64 #1 SMP Thu Sep 20 02:43:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
            [[email protected] ~]# lsmod |grep vboxsf
            vboxsf                 53248  0
            vboxguest             311296  5 vboxsf
            Reply
    2. Does not work.
      — Linux fedora-base.local 4.18.10-200.fc28.x86_64 #1 SMP Wed Sep 26 09:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
      — VirtualBox Version 5.2.18 r124319 (Qt5.11.1), from Fedora repos
      — Extension pack 5.2.18 DLed from Oracle site
      — vboxadd-setup.log
      Building the main Guest Additions module.
      Building the shared folder support module.
      Error building the module:
      make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.18.10-200.fc28.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
      make[1]: warning: -jN forced in submake: disabling jobserver mode.
      mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*

      gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuestR0LibIdc-unix.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 –param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fvar-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -mrecord-mcount -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie -I/lib/modules/4.18.10-200.fc28.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxsf/ -I/tmp/vbox.0/vboxsf/include -I/tmp/vbox.0/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -DKBUILD_BASENAME='”VBoxGuestR0LibIdc_unix”‘ -DKBUILD_MODNAME='”vboxsf”‘ -c -o /tmp/vbox.0/VBoxGuestR0LibIdc-unix.o /tmp/vbox.0/VBoxGuestR0LibIdc-unix.c
      /tmp/vbox.0/utils.c: In function ‘sf_init_inode’:
      /tmp/vbox.0/utils.c:165:28: error: passing argument 1 of ‘sf_ftime_from_timespec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
      sf_ftime_from_timespec(&inode->i_atime, &info->AccessTime);
      sf_ftime_from_timespec(&inode->i_atime, &info->AccessTime);
      ^~~~~~~~~~~~~~~
      /tmp/vbox.0/utils.c:53:53: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’

      Reply
      • Hi RW Shore,

        You should download VBoxGuestAdditions from here. Check note on step 3.

        Reply
    3. Kudos, very nice guide.

      I’m currently using the free developer subscription for RHEL 7.6.

      At least for the server, the EPEL project recommends that you also enable the optional and extras repositories since EPEL packages may depend on packages from these repositories:

      subscription-manager repos –enable “rhel-*-optional-rpms” –enable “rhel-*-extras-rpms”

      Reply
      • You’re welcome! Good point, thanks for this information.

        Reply
    4. you saved my life here ty :)

      Reply
    5. KERN_DIR=/usr/src/kernels/4.15.6-300.fc27.x86_64/build

      I don’t have the “build” folder here on fedora28 after following the step.
      Should I create ? where should this point to ?, to a directory containing the makefile ?

      Reply
      • Hi lighta,

        Yes, you don’t have that directory at all! Installer will do it when you run it, then when build is finished, this directory is removed. So no, you shouldn’t create it, just set your KERN_DIR variable and run installer.

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