Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

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 Balló György (City-busz) - Friday, 12 April 2019, 14:54 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 13
Private No


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

Comment by Evan McLean (ecognito) - Tuesday, 08 January 2019, 21:24 GMT
Confirming I am seeing the same issue, with the same log messages. Also using 6.0.0-2 on host and guest.
Comment by Luís Mendes (luisgbm) - Wednesday, 09 January 2019, 01:21 GMT
Using kernel 4.20.0-arch1-1-ARCH, virtualbox-guest-modules-arch 6.0.0-2 and virtualbox-guest-utils 6.0.0-2. The same problem occurs:

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)
Comment by nvb (nvb) - Thursday, 10 January 2019, 08:40 GMT
I can confirm this issue too by using virtual box 6.0.0-2 on the host (arch linux) and client (antergos).
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.
Comment by Lin Xiao (xiaoliniess) - Thursday, 10 January 2019, 09:41 GMT
Build vboxguest,vboxvideo and vboxsf from virtualbox original source instead of the in kernel vboxguest, vboxvideo and the modified vboxsf from github can fix both this bug and " FS#61185  - [virtualbox-guest-utils] VBoxService fails to start". The fix for #61185 is unnecessary.
Comment by nvb (nvb) - Thursday, 10 January 2019, 12:15 GMT
Thank you Lin Xiao for sharing your fix :-).

Does this indicates that it should be fixed by a new minor release (or re-release)?
Comment by Lin Xiao (xiaoliniess) - Thursday, 10 January 2019, 12:56 GMT
I attached the change I made to fix these bugs. (changes to the PKGBUILD files)
I'm not familiar with the release policy. But if the change is acceptable, a new minor release should be enough.
Comment by Mario Jaeger (j00n) - Friday, 11 January 2019, 06:51 GMT
Confirming. I've got the same issue here.
Comment by Luís Mendes (luisgbm) - Friday, 11 January 2019, 18:36 GMT
virtualbox-guest-utils was just updated to 6.0.0-3, but the problem persists. Same output log.

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
Comment by tony (tony.f) - Friday, 11 January 2019, 19:05 GMT
Same problem here. I have just updated to 6.0.0-3, still having same problem.
Comment by nvb (nvb) - Friday, 11 January 2019, 20:24 GMT
I can confirm that this error still exists with virtual box 6.0.0-3.

I can also confirm Luis Mendes workaround. Thanks for offering this :-).


#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}
Comment by Luís Mendes (luisgbm) - Wednesday, 16 January 2019, 16:23 GMT
Updated to 6.0.2-1, same problem
Comment by Lin Xiao (xiaoliniess) - Thursday, 17 January 2019, 06:08 GMT
Update previous patch to install modules into the "updates" directory to make sure the dkms built modules have higher priority than the in kernel ones.
Comment by Mario Jaeger (j00n) - Thursday, 17 January 2019, 10:21 GMT
I can also confirm that with the latest version 6.0.2 the problem still exists. The copy&paste function is also broken, which is related to VBoxService as well I think. The provided patch by Lin Xiao works. Thank you.
Comment by Luís Mendes (luisgbm) - Friday, 25 January 2019, 14:39 GMT
How is this still unconfirmed?
Comment by steadfasterX (steadfasterX) - Friday, 25 January 2019, 14:43 GMT
Thanks for the patch Lin Xiao!
Works again with that mod.. hope to see a fix in the pkg soon
Comment by Luís Mendes (luisgbm) - Monday, 28 January 2019, 18:31 GMT
Updated to virtualbox-guest-utils 6.0.4-1, problem still exists
Comment by Patrick Goetz (pgoetz) - Wednesday, 13 March 2019, 13:11 GMT
As reported here:

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.
Comment by Jorge Silva (jncs12) - Monday, 25 March 2019, 11:47 GMT
Problem still occurs on virtualbox-guest-utils 6.0.4-4.
Comment by loqs (loqs) - Saturday, 30 March 2019, 09:39 GMT Comment by Luís Mendes (luisgbm) - Wednesday, 17 April 2019, 11:18 GMT
I couldn't test it yet, but it seems as of kernel 5.1-rc3 the issue is fixed, according to the link @loqs mentioned. I've also found this comment from Torvalds:

"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.
Comment by loqs (loqs) - Wednesday, 17 April 2019, 16:39 GMT contains linux-mainline if the issue is no one wants to build a kernel from source and are prepared to trust a user repo.
If someone confirms the commit resolves the issue then arch could consider cherry-picking the commit.
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
Comment by nl6720 (nl6720) - Thursday, 18 April 2019, 11:14 GMT
Tested on guest with:
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?
Comment by Lin Xiao (xiaoliniess) - Thursday, 18 April 2019, 11:39 GMT
See, comment 4 and 5 from Hans de Goede.
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.
Comment by loqs (loqs) - Thursday, 18 April 2019, 11:44 GMT
Looking at the patch it only makes changes to the guest so I would not expect adding it to the host would make a difference but you could try it.
I would suggest contacting upstream either which is unfortunately the main kernel list as there is not a separate list mentioned [1]
with a cc to or email asking if virtualbox guest automounting is supposed to work with that commit using the kernel modules plus vboxsf [2]

perl scripts/ drivers/virt/vboxguest/vboxguest_core.c
Hans de Goede <> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER)
Arnd Bergmann <> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER)
Greg Kroah-Hartman <> (maintainer:VIRTUAL BOX GUEST DEVICE DRIVER) (open list)