FS#61307 - [virtualbox-guest-utils] automounting doesn't work
Attached to Project:
Community Packages
Opened by nl6720 (nl6720) - Tuesday, 08 January 2019, 14:43 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 08 April 2020, 13:10 GMT
Opened by nl6720 (nl6720) - Tuesday, 08 January 2019, 14:43 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 08 April 2020, 13:10 GMT
|
Details
Description:
VBoxService does not automount shared folders: automount Error: vbsvcAutomounterMountIt: Failed to mount 'VM-shared' on '/media/sf_VM-shared' because it is probably mounted elsewhere arleady! (-1,22) automount Error: vbsvcAutomounterMountIt: Failed to mount 'VM-shared' on '/media/sf_VM-shared' because it is probably mounted elsewhere arleady! (-1,22) It's not mounted elsewhere. Additional info: * package version(s) * config and/or log files etc. virtualbox-guest-utils 6.0.0-2 virtualbox-guest-modules-arch 6.0.0-2 Steps to reproduce: In VM settings add a shared folder and enable "Auto-mount", reboot the VM, ls -l /media/SHARE_NAME systemctl status -l vboxservice.service |
This task depends upon
Closed by Christian Hesse (eworm)
Wednesday, 08 April 2020, 13:10 GMT
Reason for closing: Fixed
Additional comments about closing: virtualbox 6.1.4-6
Wednesday, 08 April 2020, 13:10 GMT
Reason for closing: Fixed
Additional comments about closing: virtualbox 6.1.4-6
automount Error: vbsvcAutomounterMountIt: Failed to mount 'C_DRIVE' on '/media/sf_C_DRIVE' because it is probably mounted elsewhere arleady! (-1,22)
automount Error: vbsvcAutomounterMountIt: Failed to mount 'C_DRIVE' on '/media/sf_C_DRIVE' because it is probably mounted elsewhere arleady! (-1,22)
I made no changes on the virtual box configuration.
This issue started happening once the upgrade to virtual box 6.x was done from virtual box 5.x.
FS#61185- [virtualbox-guest-utils] VBoxService fails to start". The fix for #61185 is unnecessary.Does this indicates that it should be fixed by a new minor release (or re-release)?
I'm not familiar with the release policy. But if the change is acceptable, a new minor release should be enough.
For now, a simple workaround is to mount your shared folder via fstab:
SHARE_NAME /media/sf_SHARE_NAME vboxsf uid=1000,gid=1000,rw,dmode=700,fmode=600,noauto,x-systemd.automount
I can also confirm Luis Mendes workaround. Thanks for offering this :-).
SHARE_NAME='your_share_name'
#for fstab
${SHARE_NAME} /media/sf_${SHARE_NAME} vboxsf uid=1000,gid=100,rw,noauto,x-systemd.automount
#for the shell
mount -t vboxsf ${SHARE_NAME} /media/sf_${SHARE_NAME}
Works again with that mod.. hope to see a fix in the pkg soon
the in-kernel vbox modules (vboxdrv, vboxguest,vboxvideo, vboxsf) are currently not being maintained and are consequently no longer in sync with upstream. Seems like this problem is only going to get worse over time. As suggested by Lin Xiao, the most obvious solution is to modify the VirtualBox PKGBUILD to compile and replace the in kernel modules as well as the user space stuff. This also is more in accordance with the Arch Linux principle of following upstream as closely as possible.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f51092301a42105c5cfcb96033e8734aa1bf160
"The vboxguest patches are a bit larger. They resolve the fact that virtual box decided to change their api in their latest release in a way that broke the existing kernel code, despite saying that they were never going to do that. So this is a bit of a "new feature", but is good to get merged so that 5.1 will work with the latest release. The changes are not large and of course virtual box "swears" they will not break this again, but no one is holding their breath here."
VirtualBox was updated to 6.0.6 to support kernels 5.0 and 5.1, so it seems a fix is just around the corner.
If someone confirms the commit resolves the issue then arch could consider cherry-picking the commit.
Edit:
archive from makepkg --source of patched linux-5.0.8.arch1-1 to extract and build
test.patch git diff from linux-5.0.8.arch1-1
linux 5.0.8.arch1-1 & linux-headers 5.0.8.arch1-1 (with cherry-picked 0532a1b0d045115521a93acf28f1270df89ad806)
virtualbox-guest-utils-nox 6.0.6-1
virtualbox-guest-dkms 6.0.6-1
Still the same issue:
VBoxService[694]: 11:06:40.575256 automount Error: vbsvcAutomounterMountIt: Failed to mount 'VM-shared' on '/media/sf_VM-shared' because it is probably mounted elsewhere arleady! (-1,22)
VBoxService[694]: 11:06:41.584245 automount Error: vbsvcAutomounterMountIt: Failed to mount 'VM-shared' on '/media/sf_VM-shared' because it is probably mounted elsewhere arleady! (-1,22)
Do I also need to install the patched kernel on the host?
There are two bugs here.
The kernel change is to fix
bug 61185(which is fixed by archlinux virtualbox maintainer with a different way).To fix this bug, you need code change from the vboxsf in github provided by Hans de Goede.
I would suggest contacting upstream either linux-kernel@vger.kernel.org which is unfortunately the main kernel list as there is not a separate list mentioned [1]
with a cc to hdegoede@redhat.com or email hdegoede@redhat.com asking if virtualbox guest automounting is supposed to work with that commit using the kernel modules plus vboxsf [2]
[1]
perl scripts/get_maintainer.pl drivers/virt/vboxguest/vboxguest_core.c
Hans de Goede <hdegoede@redhat.com> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER)
Arnd Bergmann <arnd@arndb.de> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER)
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER)
linux-kernel@vger.kernel.org (open list)
[2] https://github.com/jwrdegoede/vboxsf
Kernel modules are failing for vanilla kernel but not for LTS kernel so vboxservice for vanilla but not for LTS.
But even in LTS auto-mounting keep failing:
sudo systemctl status vboxservice
[sudo] password for noraj:
● vboxservice.service - VirtualBox Guest Service
Loaded: loaded (/usr/lib/systemd/system/vboxservice.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2019-05-01 15:49:17 CEST; 1min 15s ago
Process: 336 ExecStartPre=/usr/bin/modprobe vboxguest (code=exited, status=0/SUCCESS)
Process: 342 ExecStartPre=/usr/bin/modprobe vboxvideo (code=exited, status=0/SUCCESS)
Process: 356 ExecStartPre=/usr/bin/modprobe vboxsf (code=exited, status=0/SUCCESS)
Main PID: 357 (VBoxService)
Tasks: 8 (limit: 4670)
Memory: 3.0M
CGroup: /system.slice/vboxservice.service
└─357 /usr/bin/VBoxService -f
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.364369 main OS Release: 4.19.37-1-lts
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.364371 main OS Version: #1 SMP Sat Apr 27 10:16:32 CEST 2019
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.364373 main Executable: /usr/bin/VBoxService
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.364373 main Process ID: 357
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.364374 main Package type: LINUX_64BITS_GENERIC (OSE)
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.365148 main 6.0.6 r129722 started. Verbose level = 0
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.413802 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Share' on '/home/noraj/Share' because it is probably mounted elsewhere arleady! (-1,22)
mai 01 15:49:17 penarch VBoxService[357]: 13:49:17.459553 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Share' on '/home/noraj/Share' because it is probably mounted elsewhere arleady! (-1,22)
mai 01 15:49:18 penarch VBoxService[357]: 13:49:18.505087 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Share' on '/home/noraj/Share' because it is probably mounted elsewhere arleady! (-1,22)
mai 01 15:49:18 penarch VBoxService[357]: 13:49:18.552677 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Share' on '/home/noraj/Share' because it is probably mounted elsewhere arleady! (-1,22)
In LTS manual mount with options fails too:
sudo mount -o umask=0022,gid=1000,uid=1000 -t vboxsf Share /home/noraj/Share
mount: /home/noraj/Share: wrong fs type, bad option, bad superblock on Share, missing codepage or helper program, or other error.
But in LTS manual mount without options works:
sudo mount -t vboxsf Share /home/noraj/Share
As the upstream introduced another bug(https://www.virtualbox.org/ticket/18569) in vboxsf since 6.0.6 and still not fixed in 6.0.8, using vboxsf from github is a better option now.
1. Follow virtualbox official upstream, build all kernel modules and user space tools from upstream source.
2. Follow Hans de Goede, use the in kernel guest modules and vboxsf from github. Also apply the userspace tool patch in fedora package provided by Hans de Goede.
Currently archlinux is using partially the second way. Guest kernel modules are built from in kernel source and github, but the patch to userspace tools in fedora package is not applied. So automount doesn't work.
I prefer the second way as it's more stable. Virtualbox upstream change code frequently so more likely to introduce new bug. The virtualbox upstream may also not follow linux kernel close enough and may block kernel update.
automount vbsvcAutomounterMountIt: Successfully mounted 'VM-shared' on '/media/sf_VM-shared'
18:38:26.305178 main Log opened 2020-01-19T18:38:26.305160000Z
18:38:26.305332 main OS Product: Linux
18:38:26.305383 main OS Release: 5.4.12-arch1-1
18:38:26.305401 main OS Version: #1 SMP PREEMPT Tue, 14 Jan 2020 21:44:31 +0000
18:38:26.305418 main Executable: /usr/bin/VBoxService
18:38:26.305419 main Process ID: 791
18:38:26.305420 main Package type: LINUX_64BITS_GENERIC (OSE)
18:38:26.306321 main 6.1.2 r135662 started. Verbose level = 0
18:38:26.315132 automount Error: vbsvcAutomounterMountIt: Failed to mount 'archive1' on '/archive1' because it is probably mounted elsewhere arleady! (-1,22)
18:38:26.317069 automount Error: vbsvcAutomounterMountIt: Failed to mount 'archive2' on '/archive2' because it is probably mounted elsewhere arleady! (-1,22)
vboxsf: module verification failed: signature and/or required key missing - tainting kernel
Please try virtualbox 6.1.4-6.