VirtualBox Guest Additions installation hanging on Vagrant 2.3.7 & VirtualBox 7.0.8

Ran into this issue after updating both Vagrant to 2.3.7 and VirtualBox to 7.0.8. Host OS is macOS 13.4.1, guest OS is Ubuntu 22.04 using the box ubuntu/jammy64 (virtualbox, 20230616.0.0). The only Vagrant plugin installed is vagrant-vbguest (0.31.0, global).

Steps to reproduce:

  1. Create empty directory and cd into directory, run vagrant init
  2. Change box to “ubuntu/jammy64” and configure networking / memory footprint in Vagrantfile
  3. Run vagrant up
  4. Box boots and notes that tools needed for rebuilding or starting VirtualBox Guest additions [were] not found: [default] A Virtualbox Guest Additions installation was found but no tools to rebuild or start them.
  5. Box downloads and installs those tools.
  6. Box mounts the VBoxGuestAdditions.iso and attempts to install the updated guest additions:
Copy iso file /Applications/ into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
Installing Virtualbox Guest Additions 7.0.8 - guest version is 6.0.0`
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.8 Guest Additions for Linux  100%
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
/opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: cannot open shared object file: No such file or directory
/opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: cannot open shared object file: No such file or directory
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
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 5.15.0-75-generic.
update-initramfs: Generating /boot/initrd.img-5.15.0-75-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted or 'rcvboxadd reload' triggered
VirtualBox Guest Additions: reloading kernel modules and services

At this point the VM hangs indefinitely and will not continue.

I have tried a full uninstall and fresh install of both Vagrant and VirtualBox; the issue persists.

Disabling the automatic guest additions updates by adding the following to the Vagrantfile:

if Vagrant.has_plugin?("vagrant-vbguest") then
  config.vbguest.auto_update = false

prevents the update and the box boots without issues, although with the version of guest additions included with the box (6.0.0).

Attempting to download the VirtualBoxGuestAdditions ISO from and manually install them following the instructions therein results in the same hang issue. I am working on attempting to install tooling such as gcc, etc first in the manual process to see if this helps with the install or not.

It is not clear if this is a VirtualBox or an Ubuntu issue at this point, but appears to be some combination of the two.

Please let me know if I should also be posting this over to the VirtualBox forums for assistance. I appreciate if there are any others who can confirm this issue as well.

Confirming that pre-installing the tooling mentioned (gcc, make, perl) does not fix this issue.

According to some searches on the VirtualBox forums, this appears to be an issue with VirtualBox 7.0.8. Current recommendations are to backport to VirtualBox 7.0.6 for the time being; I’ll be doing this and updating with results thereafter.

FYI, resolution for this was to use the development snapshot of VirtualBox 157803 from Testbuilds – Oracle VM VirtualBox

This fixed the issue both with the Guest Additions hanging on installation, as well as related issues with mounted folders being removed after booting the machine.

More on the discussion is here: Guest Additions install fails on Virtual Box 7.0.8 for Ubuntu 22.04 guest -