Unable to install VirtualBox Guest Additions in Rocky 8.9 guest

I’m running into the same problem described here:

Did the things suggested there, including installing all the stuff that was recommended, and nothing works, still getting:

VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
4.18.0-513.5.1.el8_9.x86_64.

VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
ValueError: File context for /opt/VBoxGuestAdditions-6.1.22/other/mount.vboxsf already defined
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.

The file vboxadd-setup.log looks like this:

Building the main Guest Additions 6.1.22 module for kernel 4.18.0-513.5.1.el8_9.x86_64.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/4.18.0-513.5.1.el8_9.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2; \
echo >&2 "  ERROR: Kernel configuration is invalid.";           \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \
echo >&2 ;                                                      \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
(cat /dev/null;   echo kernel//tmp/vbox.0/vboxguest.ko;) > /tmp/vbox.0/modules.order
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated   -I./include/drm-backport -I./include -I./arc
   ./tools/objtool/objtool orc generate  --rethunk  --module --no-fp  --retpoline "/tmp/vbox.0/.tmp_VBoxGuest-linux.o";
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated   -I./include/drm-backport -I./include -I./arch/x86/
   ./tools/objtool/objtool orc generate  --rethunk  --module --no-fp  --retpoline "/tmp/vbox.0/.tmp_VBoxGuest.o";
  gcc -Wp,-MD,/tmp/vbox.0/common/string/.strformatrt.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include/drm-backport -I./inclu
   ./tools/objtool/objtool orc generate  --rethunk  --module --no-fp  --retpoline "/tmp/vbox.0/common/string/.tmp_strformatrt.o";
  gcc -Wp,-MD,/tmp/vbox.0/.combined-agnostic.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include/drm-backport -I./include -I./a
   ./tools/objtool/objtool orc generate  --rethunk  --module --no-fp  --retpoline "/tmp/vbox.0/.tmp_combined-agnostic.o";
  gcc -Wp,-MD,/tmp/vbox.0/.combined-os-specific.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include/drm-backport -I./include -I
In file included from /tmp/vbox.0/combined-os-specific.c:30:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtR0MemAllocExecVmArea’:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:204:14: error: implicit declaration of function ‘map_vm_area’; did you mean ‘get_vm_area’? [-Werror=implicit-function-declaration]
         if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
              ^~~~~~~~~~~
              get_vm_area
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:318: /tmp/vbox.0/combined-os-specific.o] Error 1
make[1]: *** [Makefile:1619: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxguest] Error 2
modprobe vboxguest failed

Tried “Run ‘make oldconfig && make prepare’ on kernel src to fix it” like the logfile suggest, no benefit.

VirtualBox version is 6.1.22 r144080 (Qt5.6.2) with matching Guest Additions installer.

Grateful for any help…

Eric

No one has had success fixing this issue loading VirtualBox Guest Additions on Rocky 8.9?

Have you got the kernel-devel package installed? Since that is the package that has that autoconf.h file.

Good afternoon, Ian. Yes, kernel-devel is installed and autoconf.h is in /usr/src/kernels/(current_kernel)/include/generated/autoconf.h. Installing kernel-devel is one of the early things I did when I installed the package in VirtualBox.

Eric

I have done everything listed here:

No luck, still unable to install VB Guest Additions.

Do any of you actually have a running VB Guest Additions on a Rocky 8 guest, even if it Just Worked right out of the box? I’m beginning to wonder if there is something basic missing in the Rocky distro.

Eric

Sadly I don’t personally. Since the kernel includes the KVM module, I’ve been using this for VM’s for years now and using virt-manager as the GUI interface for managing them. Although you can do it with cockpit as well via web browser.

I tend to stay away from Oracle VirtualBox because it’s always been problematic in one way or another.

I’m sure there are others here that do use it though that might be able to help out.

I’m running rl9 in a VBox-7.0.12 vm on a fedora host. I just built the Guestaddition modules and installed them today. The steps I took were to install the prerequisite software:
make
gcc
kernel-devel
dkms
I then loaded the vbox guestadditions iso in the vbox device manager for the rl9 vdi. As root I used parted to find that the virt cdrom is /dev/sr0. I created /mnt/iso to mount the iso there then cd’d to that directory. I ran the command:
sh ./VBoxGuestAdditionsLinux.run
The build completed successfully. I post this response only as an example of the steps I took. I understand you are using rl8 and the long time service “6.1” version of vbox. Does you guestadditions version match the host VirtaulBox version?

Thanks, jbkt23. I ended up doing most of what you describe.

I had earlier tried to install Rocky 9 and got kernel crashes during the installation process, which is why I reverted to Rocky 8. I upgraded VirtualBox to 7.0.14 and was then able to install Rocky 9. Added all the required packages like dkms, kernel-devel, etc. and the Guest Additions then installed correctly.

So, the answer is that (1) Rocky 9 apparently won’t install on VB6, it requires VB7; and (2) Guest Additions works on Rocky 9 but (so far) not on Rocky 8.

So, I’m all set for now. Thanks to everyone for your help.

Eric

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.