@chrisroberts :: 2023 05 20; 15:35: I tried removing the offending file listed in the error logs (actually the entire folder), removing the Guest Additions service, and reinstalling the appropriate VBoxGuestAdditions 7.0.8. The effort resulted in a clear indication that the removal succeeded and the reinstall failed. Here is the relevant console log data:
[vagrant@fedora37 mnt]$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.8 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
./install.sh: line 153: VBoxControl: command not found
This system appears to have a version of the VirtualBox Guest Additions
already installed. If it is part of the operating system and kept up-to-date,
there is most likely no need to replace it. If it is not up-to-date, you
should get a notification when you start the system. If you wish to replace
it with this version, please do not continue with this installation now, but
instead remove the current version first, following the instructions for the
operating system.
If your system simply has the remains of a version of the Additions you could
not remove you should probably continue now, and these will be removed during
installation.
Do you wish to continue? [yes or no]
n
Cancelling installation.
[vagrant@fedora37 mnt]$ sudo ./VBoxLinuxAdditions.run uninstall
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.8 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
./install.sh: line 153: VBoxControl: command not found
This system appears to have a version of the VirtualBox Guest Additions
already installed. If it is part of the operating system and kept up-to-date,
there is most likely no need to replace it. If it is not up-to-date, you
should get a notification when you start the system. If you wish to replace
it with this version, please do not continue with this installation now, but
instead remove the current version first, following the instructions for the
operating system.
If your system simply has the remains of a version of the Additions you could
not remove you should probably continue now, and these will be removed during
installation.
Do you wish to continue? [yes or no]
y
[vagrant@fedora37 mnt]$ sudo ./VBoxLinuxAdditions.run
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 ...
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
6.2.15-200.fc37.x86_64.
ValueError: File context for /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf already defined
[vagrant@fedora37 mnt]$ sudo vbox-uninstall-guest-additions
Removing installed version 7.0.8 of VirtualBox Guest Additions...
[vagrant@fedora37 mnt]$ sudo vbox-uninstall-guest-additions
sudo: vbox-uninstall-guest-additions: command not found
[vagrant@fedora37 mnt]$ sudo ./VBoxLinuxAdditions.run
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 ...
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
6.2.15-200.fc37.x86_64.
ValueError: File context for /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf already defined
[vagrant@fedora37 mnt]$
I took one more look at the issue identified at ValueError, above. The file context is relate to SELinux mods to base Fedora, and from what I can read, this is a benign error which should be ignored. The following commands, apparently, remove the file context, and then restore default context, which seems to be what is needed for the script to run successfully:
[vagrant@fedora37 mnt]$ sudo semanage fcontext -d /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf
[vagrant@fedora37 mnt]$ sudo restorecon /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf
I then used vagrant reload
to restart the VBox instance, which wen through normally:
E:\Vagrant Boxes>vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'generic/fedora37' version '4.2.16' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
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
6.2.15-200.fc37.x86_64.
ValueError: File context for /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf already defined
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
I checked the running services and found the desired result:
E:\Vagrant Boxes>vagrant ssh
Last login: Sat May 20 22:07:45 2023 from 10.0.2.2
[vagrant@fedora37 ~]$ systemctl list-units --type=service
UNIT LOAD ACTIVE SUB DESCRIPTION >
auditd.service loaded active running Security Auditing Service
chronyd.service loaded active running NTP client/server
dbus-broker.service loaded active running D-Bus System Message Bus
dkms.service loaded active exited Builds and install new kernel modules through DKMS
dracut-shutdown.service loaded active exited Restore /run/initramfs on shutdown
firewalld.service loaded active running firewalld - dynamic firewall daemon
getty@tty1.service loaded active running Getty on tty1
haveged.service loaded active running Entropy Daemon based on the HAVEGE algorithm
kmod-static-nodes.service loaded active exited Create List of Static Device Nodes
lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using d>
lvm2-pvscan@8:3.service loaded active exited LVM event activation on device 8:3
memcached.service loaded active running memcached daemon
NetworkManager-wait-online.service loaded active exited Network Manager Wait Online
NetworkManager.service loaded active running Network Manager
polkit.service loaded active running Authorization Manager
sshd.service loaded active running OpenSSH server daemon
sysstat.service loaded active exited Resets System Activity Logs
systemd-boot-update.service loaded active exited Automatic Boot Loader Update
systemd-hostnamed.service loaded active running Hostname Service
systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-modules-load.service loaded active exited Load Kernel Modules
systemd-network-generator.service loaded active exited Generate network units from Kernel command line
systemd-oomd.service loaded active running Userspace Out-Of-Memory (OOM) Killer
systemd-random-seed.service loaded active exited Load/Save Random Seed
systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems
systemd-resolved.service loaded active running Network Name Resolution
systemd-sysctl.service loaded active exited Apply Kernel Variables
systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories
systemd-udev-trigger.service loaded active exited Coldplug All udev Devices
systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files
systemd-update-utmp.service loaded active exited Record System Boot/Shutdown in UTMP
systemd-user-sessions.service loaded active exited Permit User Sessions
systemd-userdbd.service loaded active running User Database Manager
systemd-zram-setup@zram0.service loaded active exited Create swap on /dev/zram0
tuned.service loaded active running Dynamic System Tuning Daemon
user-runtime-dir@1000.service loaded active exited User Runtime Directory /run/user/1000
user@1000.service loaded active running User Manager for UID 1000
vboxadd-service.service loaded active exited vboxadd-service.service
vboxadd.service loaded active exited vboxadd.service
vboxservice.service loaded active running VirtualBox guest services
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
43 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
What I find strange is that the boot process finds that Guest Additions 7.0.8 is already (correctly) loaded but not running. I would seem to me that just starting the service would make sense. Instead, the plugin goes and tries to reinstall the GA again, and reboots the instance. This seems totally unnecessary. My workaround is to remove the plugin, once I’m sure the proper GA is installed. If I have to start it manually, OK, I can do that.
2023 05 20; 18:10: Well, no I can’t. The instance reports that GA 7.0.8 seems to be installed correctly, but when I try to start it manually, I am unable to do so:
E:\Vagrant Boxes>vagrant reload
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'generic/fedora37' version '4.2.16' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
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
6.2.15-200.fc37.x86_64.
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
E:\Vagrant Boxes>vagrant vbguest --status
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
E:\Vagrant Boxes>vagrant vbguest --do start
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
E:\Vagrant Boxes>vagrant vbguest --status
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
E:\Vagrant Boxes>vagrant vbguest --do rebuild
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
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
6.2.15-200.fc37.x86_64.
ValueError: File context for /opt/VBoxGuestAdditions-7.0.8/other/mount.vboxsf already defined
E:\Vagrant Boxes>vagrant vbguest --status
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
E:\Vagrant Boxes>vagrant vbguest --do start
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
Redirecting to /bin/systemctl start vboxadd.service
Redirecting to /bin/systemctl start vboxadd-service.service
E:\Vagrant Boxes>vagrant vbguest --status
[default] GuestAdditions seems to be installed (7.0.8) correctly, but not running.
That’s all for today.
I’m not sure what you can do to make this easier, I hope that you will find something and fix these problems so I (and others) can be more productive in using Hashicorp apps. DVH