Greetings -
Any ideas on getting VirtualBox Guest Additions to work for a Rocky 9.3 based VM?
I cannot get Guest Additions (GA) to work for a VirtualBox VM. I’ve tried on both an Ubuntu 20.04 host with VB 6.1 and a Windows 11 host with VB 7.0. There is a similar sounding problem in a couple other posts, unable-to-install-virtualbox-guest-additions-in-rocky-8-9, or even cannot-build-virtualbox-guest-additions, with other people having problems with GA.
After having the problems getting GA to work with the Rocky VM on the Ubuntu host I assumed the problems were from something wrong on the Ubuntu system so I switched to a windows 11 host and the problems continue. All of below info is from trying this on the Windows system. I’ve been running Ubuntu systems and VMs and wanted to try out RH based distros - but not having fun so far. From scouring the internet for this problem it seems like there is some kind of fundamental issue with GA and RH based distros. That seems extremely odd to me though so it must be because I have been using Ubuntu and am not linux admin level anyway.
Host is Windows 11 but same problem happens on an Ubuntu host
I already have several Ubuntu VMs with GA working fine so the host and VB install are okay. Just got the Rocky 9.3 DVD ISO yesterday (should I have chosen the 8.x? instead?)
VirtualBox version 7.0 is installed (on Ubuntu it was the 6.1 but same problem with GA)
With Ubuntu its been as easy as clicking “insert Guest Additions CD” and everything works without all this building the kernel stuff. I find it hard to believe that RH would be having all its paying corporate customers doing that, so am sure something strange is going on.
I have tried everything from these articles below and none of them solve the problems.
www.linuxtechi[.]com/install-virtualbox-guest-additions-on-rhel/
www.linkedin[.]com /pulse/installing-virtualbox-guest-additions-centosrhel-enhanced-soran
forums.virtualbox[.]org /viewtopic.php?t=1091421
technixleo[.]com /install-and-use-virtualbox-on-centos-rhel/
kifarunix[.]com /install-virtualbox-guest-additions-on-rocky-linux-9/
Those pages are centered around building some kernel files for the GA. That is something I never needed to do with Ubuntu. NOTE: I put a space after the .com or .org so the forum system didn’t put link previews in, so you’ll have to delete that space to get to the link.
There are always errors after running “/run/media/$USER/VBox_GAs_7.0.4/VBoxLinuxAdditions.run” (as sudo of course).
It prints out:
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
ValueError: File context for /opt/VBoxGuestAdditions-7.0.4/other/mount.vboxsf already defined
The log file vboxadd-setup.log contains these errors below. There might be a couple more errors that I didn’t copy over to this post but hopefully you get the idea. Also, to keep the post even shorter I only copied the lines with the error statement - didn’t see a way to attach the whole file here.
/tmp/vbox.0/regops.c:3779:63: error: passing argument 6 of ‘simple_write_begin’ from incompatible pointer type [-Werror=incompatible-pointer-types]
/tmp/vbox.0/regops.c:3779:12: error: too many arguments to function ‘simple_write_begin’
/tmp/vbox.0/regops.c:3859:6: error: ‘struct address_space_operations’ has no member named ‘readpage’
The site above at “virtualbox.org” looked promising because it was editing the file regops.c with three one-line changes, but it did not work either. After editing that file the error in the log file is these 3 instances of missing a header file:
In file included from /tmp/vbox.0/vboxvideo_guest.h:34,
from /tmp/vbox.0/modesetting.c:27:
/tmp/vbox.0/vbox_drv.h:171:10: fatal error: drm/ttm/ttm_bo_api.h: No such file or directory
171 | #include <drm/ttm/ttm_bo_api.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /tmp/vbox.0/hgsmi_base.c:27:
/tmp/vbox.0/vbox_drv.h:171:10: fatal error: drm/ttm/ttm_bo_api.h: No such file or directory
171 | #include <drm/ttm/ttm_bo_api.h>
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/vbox.0/vbox_drv.c:35:
/tmp/vbox.0/vbox_drv.h:171:10: fatal error: drm/ttm/ttm_bo_api.h: No such file or directory
171 | #include <drm/ttm/ttm_bo_api.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I’ll try out any ideas to get this working - if its possible.
It seems like tens of thousands of people would be having this problem though instead of just me. Since I had the same / similar problems on both the Ubuntu and Windows system I’m pretty sure this is a red-hat with virtualbox problem and not related to my specific computer(s).
Thanks in advance!