# Unable to install VirtualBox Guest Additions in Rocky 8.9 guest

**URL:** <https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659>\
**Category:** Rocky Linux Help & Support\
**Created:** [January 27, 2024, 6:42pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659 "2024-01-27T18:42:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericp-nh](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@ericp-nh](https://forums.rockylinux.org/u/ericp-nh)\
**Post date:** [January 27, 2024, 6:42pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/1 "2024-01-27T18:42:47Z")

</div>

I’m running into the same problem described here:

> [@Cannot build Virtualbox Guest Additions](https://forums.rockylinux.org/t/cannot-build-virtualbox-guest-additions/5467):
>
> Hey All, Hoping for some suggestions here. I’m running Rocky 8.5 and trying to install the guest addons from VirtualBox 6.0.10. I’ve installed the packages to build but the log says that it’s missing files. Unfortunately I do not have the option to update VirtualBox to the latest (6.1) yet. Any ideas or help would be awesome! vboxadd-setup.log ~~ Building the main Guest Additions 6.0.10 module for kernel 4.18.0-348.12.2.el8\_5.x86\_64. Error building the module. Build output follows. make V=…

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

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![ericp-nh](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@ericp-nh](https://forums.rockylinux.org/u/ericp-nh)\
**Post date:** [February 1, 2024, 3:05pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/2 "2024-02-01T15:05:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [February 1, 2024, 6:53pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/3 "2024-02-01T18:53:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ericp-nh](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@ericp-nh](https://forums.rockylinux.org/u/ericp-nh)\
**Post date:** [February 1, 2024, 7:52pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/4 "2024-02-01T19:52:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ericp-nh](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@ericp-nh](https://forums.rockylinux.org/u/ericp-nh)\
**Post date:** [February 2, 2024, 4:14pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/5 "2024-02-02T16:14:06Z")

</div>

I have done everything listed here:

> **[How to install Virtualbox Guest additions on Rocky Linux 8](https://linux.how2shout.com/two-ways-to-install-virtualbox-guest-addtions-on-rocky-linux-8/)**
>
> Learn the steps and commands to instal VirtualBox Guest Additions CD ISO file on Rocky Linux 8 usinf GUI & Command terminal

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

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [February 2, 2024, 7:19pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/6 "2024-02-02T19:19:02Z")

</div>

> [@ericp-nh](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![jbkt23](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jbkt23](https://forums.rockylinux.org/u/jbkt23)\
**Post date:** [February 2, 2024, 10:59pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/7 "2024-02-02T22:59:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ericp-nh](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@ericp-nh](https://forums.rockylinux.org/u/ericp-nh)\
**Post date:** [February 3, 2024, 12:27pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/8 "2024-02-03T12:27:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [April 3, 2024, 12:28pm UTC](https://forums.rockylinux.org/t/unable-to-install-virtualbox-guest-additions-in-rocky-8-9-guest/12659/9 "2024-04-03T12:28:20Z")

</div>

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