Opened 21 months ago
Closed 18 months ago
#21639 closed defect (fixed)
Shared folders get unmunted during apt-get with 7.0.8
Reported by: | hartmut | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox-7.0.8 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description
I'm using vagrant to manage my VirtualBox instances, and the vagrant-vbguest plugin to keep guest additions up to date.
After upgrading from VirtualBox 7.0.6 to 7.0.8 I find shared folders in guest VMs to have gone unmounted after running "apt-get install ...". I can reproduce this on two different host machines, one running Ubuntu 22.04, the other Debian 11, and guest machines using different ubuntu/* base box versions from app.vagrantup.com
When disabling the vagrant-vbguest plugin so that the VMs keep running with the version 6.x guest additions instead of compiling and installing 7.0.8 versions all works fine.
So the problem clearly doesn't seem to be on the vagrant side of things, but on the VirtualBox side.
Unfortunately there is nothing obvious in the vagrant log output, or the virtual guests system journal or dmsg logs explaining this in any way, it is just that I can see my shared folders still mounted using "vboxsf" file system type before running apt-get, and when re-checking again after apt-get finished installing packages all vboxsf mounts are gone. Nothing in the host system log either.
I even tried to strace the apt-get process and all of its child processes using "strace -f ...", but there are no traces of any umount operations in there either.
I also tried with 7.0.9 test build, but that already fails while vagrant-vbguest is trying to do its job, ending with
`
os-focal: Guest Additions Version: 6.1.38 os-focal: VirtualBox Version: 7.0
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
umount /mnt
Stdout from the command:
Stderr from the command:
umount: /mnt: not mounted.
==> os-focal: Forcing shutdown of VM...
`
while with 7.0.8 that step completes, and only when installing further packages in my actual provisioning script mounts disappear.
So for now I rolled back to 7.0.6 ...
Change History (7)
comment:1 by , 21 months ago
comment:2 by , 20 months ago
Also getting this after upgrading to from VirtualBox 6.1.42 to 7.0.8 and using vagrant 2.3.6 on windows with a Centos/8 image 'generic/centos8 (virtualbox, 4.2.16)'
vagrant vbguest idpdev04n99 --status [idpdev04n99] GuestAdditions versions on your host (7.0.8) and guest (6.1.30) do not match. Once upgraded to 7.0.8 guest additions shared folders disappear after about 1 minute
comment:3 by , 20 months ago
Hi guys,
Without additional info (rcvboxadd reload/status-kernel/status-user) it is hard to proceed with this issue.
comment:4 by , 20 months ago
vbguest idpdev04n99 [idpdev04n99] GuestAdditions versions on your host (7.0.8) and guest (6.1.30) do not match. Last metadata expiration check: 0:02:53 ago on Tue 06 Jun 2023 12:18:49 PM AEST. Package kernel-devel-4.18.0-348.7.1.el8_5.x86_64 is already installed. Package kernel-devel-4.18.0-348.7.1.el8_5.x86_64 is already installed. Package gcc-8.5.0-4.el8_5.x86_64 is already installed. Package binutils-2.30-108.el8_5.1.x86_64 is already installed. Package make-1:4.2.1-10.el8.x86_64 is already installed. Package perl-interpreter-4:5.26.3-420.el8.x86_64 is already installed. Package bzip2-1.0.6-26.el8.x86_64 is already installed. Package elfutils-libelf-devel-0.185-1.el8.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Mounting Virtualbox Guest Additions ISO to: /mnt mount: /mnt: WARNING: device write-protected, mounted read-only. Installing Virtualbox Guest Additions 7.0.8 - guest version is 6.1.30 Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing VirtualBox 7.0.8 Guest Additions for Linux 100% VirtualBox Guest Additions installer Removing installed version 6.1.30 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: 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 4.18.0-348.7.1.el8_5.x86_64. 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 currently loaded module vboxguest version (7.0.8 r156879) does not match to VirtualBox Guest Additions installation version (unknown unknown) The log file /var/log/vboxadd-setup.log may contain further information. An error occurred during installation of VirtualBox Guest Additions 7.0.8. Some functionality may not work as intended. In most cases it is OK that the "Window System drivers" installation failed. Redirecting to /bin/systemctl start vboxadd.service Job for vboxadd.service failed because a timeout was exceeded. See "systemctl status vboxadd.service" and "journalctl -xe" for details. Redirecting to /bin/systemctl start vboxadd-service.service Unmounting Virtualbox Guest Additions ISO from: /mnt cat /var/log/vboxadd-setup.log Building the main Guest Additions 7.0.8 module for kernel 4.18.0-348.7.1.el8_5.x86_64. Building the shared folder support module. Building the graphics driver module. Could not find the X.Org or XFree86 Window System, skipping. vagrant reload idpdev04n99 ==> idpdev04n99: Attempting graceful shutdown of VM... ==> idpdev04n99: Checking if box 'generic/centos8' version '4.2.16' is up to date... ==> idpdev04n99: Clearing any previously set forwarded ports... ==> idpdev04n99: Clearing any previously set network interfaces... ==> idpdev04n99: Preparing network interfaces based on configuration... idpdev04n99: Adapter 1: nat ==> idpdev04n99: You are trying to forward to privileged ports (ports <= 1024). Most ==> idpdev04n99: operating systems restrict this to only privileged process (typically ==> idpdev04n99: processes running as an administrative user). This is a warning in case ==> idpdev04n99: the port forwarding doesn't work. If any problems occur, please try a ==> idpdev04n99: port higher than 1024. ==> idpdev04n99: Forwarding ports... idpdev04n99: 22 (guest) => 2222 (host) (adapter 1) idpdev04n99: 80 (guest) => 8080 (host) (adapter 1) idpdev04n99: 443 (guest) => 443 (host) (adapter 1) idpdev04n99: 22 (guest) => 2222 (host) (adapter 1) ==> idpdev04n99: Running 'pre-boot' VM customizations... ==> idpdev04n99: Booting VM... ==> idpdev04n99: Waiting for machine to boot. This may take a few minutes... idpdev04n99: SSH address: 127.0.0.1:2222 idpdev04n99: SSH username: vagrant idpdev04n99: SSH auth method: private key ==> idpdev04n99: Machine booted and ready! ==> idpdev04n99: Checking for guest additions in VM... idpdev04n99: The guest additions on this VM do not match the installed version of idpdev04n99: VirtualBox! In most cases this is fine, but in rare cases it can idpdev04n99: prevent things such as shared folders from working properly. If you see idpdev04n99: shared folder errors, please make sure the guest additions within the idpdev04n99: virtual machine match the version of VirtualBox you have installed on idpdev04n99: your host and reload your VM. idpdev04n99: idpdev04n99: Guest Additions Version: 6.1.30 idpdev04n99: VirtualBox Version: 7.0 ==> idpdev04n99: Setting hostname... ==> idpdev04n99: Mounting shared folders... idpdev04n99: /vagrant => C:/DEVEL/vagrant/vg-idp4 idpdev04n99: /hieradata => C:/DEVEL/vagrant/hieradata idpdev04n99: /tmp/vagrant-puppet/environments => C:/DEVEL ==> idpdev04n99: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==> idpdev04n99: flag to force provisioning. Provisioners marked to run always will still run. vagrant vbguest idpdev04n99 [idpdev04n99] GuestAdditions 7.0.8 running --- OK. LOST shared folders vagrant provision --provision-with puppet idpdev04n99 ==> idpdev04n99: Running provisioner: puppet... ==> idpdev04n99: Running Puppet with environment puppet... ==> idpdev04n99: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:40:in `get!': Could not find a directory environment named 'puppet' anywhere in the path: /tmp/vagrant-puppet/environments. Does the directory exist? (Puppet::Environments::EnvironmentNotFound) ==> idpdev04n99: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application_support.rb:34:in `push_application_context' ==> idpdev04n99: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:370:in `run' ==> idpdev04n99: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run' ==> idpdev04n99: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute' ==> idpdev04n99: from /opt/puppetlabs/puppet/bin/puppet:5:in `<main>' The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. # rcvboxadd status /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory The VirtualBox Additions are currently running. # # rcvboxadd status-kernel /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory currently loaded module vboxguest version (7.0.8 r156879) does not match to VirtualBox Guest Additions installation version (unknown unknown) The log file /var/log/vboxadd-setup.log may contain further information. # # # rcvboxadd status-user /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory VirtualBox Guest Additions: User-land services are running # rcvboxadd reload /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.8/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory VirtualBox Guest Additions: reloading kernel modules and services currently loaded module vboxguest version (7.0.8 r156879) does not match to VirtualBox Guest Additions installation version (unknown unknown) The log file /var/log/vboxadd-setup.log may contain further information.
comment:5 by , 20 months ago
Hi Gary,
Thank you for details. I can spot two issues there.
- rcvboxadd cannot detect Additions version due to missing X11 libraries (VBoxClient needs it), and
- there is a timeout when starting Additions service.
Both issues were fixed on the development branch. If you pick up Guest Additions 7.0.9 from "Latest 7.0.x test builds" on the Test Builds page, it should solve the problem.
comment:6 by , 20 months ago
Upgraded to 7.0.9 All working now, shared folders aren't droppped
[root@idpdev04n99 ~]# rcvboxadd status-user VirtualBox Guest Additions: user-land services are running
[root@idpdev04n99 ~]# rcvboxadd status-kernel VirtualBox Guest Additions: kernel modules are loaded
[root@idpdev04n99 ~]# rcvboxadd status The VirtualBox Additions are currently running.
[root@idpdev04n99 ~]# rcvboxadd reload VirtualBox Guest Additions: reloading kernel modules and services VirtualBox Guest Additions: kernel modules and services 7.0.9 r157679 reloaded VirtualBox Guest Additions: NOTE: you may still consider to re-login if some user session specific services (Shared Clipboard, Drag and Drop, Seamless or Guest Screen Resize) were not restarted automatically
comment:7 by , 18 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi hartmut,
In 7.0.8 we introduced experimental support for Linux Guest Additions reloading during installation. It means, once installer unpacked all the files and binaries, it will attempt to stop all the running Guest Additions user-land services, unmount all vboxsf shares, unload old kernel modules, load newly installed kernel modules and restart services. The intention of this -- is to avoid unnecessary guest reboot after GAs update.
This procedure might fail if, for example, vboxsf share is still in use during installation. Moreover,
VBoxClient
services (if were running) will not be reloaded when updating from 6.1.x/pre-7.0.8 Additions to 7.0.8 (this is expected since older Additions are not aware of this functionality).If you experiencing issues with automatic reloading, you might want to try it manually to get more information on what could go wrong:
sudo rcvboxadd reload
. You can also check status of user-land services and kernel modules by running eithersudo rcvboxadd status-user
orsudo rcvboxadd status-kernel
.