[Solved] Debian Jessie shared folder not mounting after upgrading to 5.1.16

Discussions about using Linux guests in VirtualBox.
Post Reply
Mark1978
Posts: 4
Joined: 9. Mar 2017, 14:34

[Solved] Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Mark1978 »

I've just upgraded VirtualBox from 5.1.12 to 5.1.16 and the shared folders are no longer mounting on a Linux guest. It's worth noting that my windows 7 guest works fine with shared folders.

Host: Ubuntu 16.10 with VirtualBox 5.1.16 r113841. Extension pack 5.1.16-113841 installed
VM: Debian 8.7 (Jessie), Kernel 3.16.0-4-amd64, Guest additions 5.1.16 installed

When the VM boots, the folder is created in /media correctly but the mount itself doesn't happen. Here is the last chunk of the dmesg output:
[ 2161.010275] vboxguest: misc device minor 59, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)
[ 2161.010277] vboxguest: Successfully loaded version 5.1.16 (interface 0x00010004)
[ 2161.018271] [drm] VRAM 00c00000
[ 2161.018644] [TTM] Zone  kernel: Available graphics memory: 382138 kiB
[ 2161.018645] [TTM] Initializing pool allocator
[ 2161.018649] [TTM] Initializing DMA pool allocator
[ 2161.018906] fbcon: vboxdrmfb (fb0) is primary device
[ 2161.021671] Console: switching to colour frame buffer device 100x37
[ 2161.025436] vboxvideo 0000:00:02.0: fb0: vboxdrmfb frame buffer device
[ 2161.025437] vboxvideo 0000:00:02.0: registered panic notifier
[ 2161.025441] [drm] Initialized vboxvideo 1.0.0 20130823 for 0000:00:02.0 on minor 0
[ 2163.744351] floppy0: no floppy controllers found
[ 2163.744471] work still pending
[ 2163.850010] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 2163.850584] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 2163.851245] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 2164.048596] RPC: Registered named UNIX socket transport module.
[ 2164.048598] RPC: Registered udp transport module.
[ 2164.048599] RPC: Registered tcp transport module.
[ 2164.048600] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 2164.052089] FS-Cache: Loaded
[ 2164.058597] FS-Cache: Netfs 'nfs' registered for caching
[ 2164.067996] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 2164.627209] vboxsf: Successfully loaded version 5.1.16 (interface 0x00010004)
[ 2164.974771] VBoxService 5.1.16 r113841 (verbosity: 0) linux.amd64 (Mar  8 2017 15:55:47) release log
00:00:00.000072 main     Log opened 2017-03-09T12:08:56.204955000Z
[ 2164.974805] 00:00:00.000138 main     OS Product: Linux
[ 2164.974820] 00:00:00.000156 main     OS Release: 3.16.0-4-amd64
[ 2164.974833] 00:00:00.000169 main     OS Version: #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)
[ 2164.974851] 00:00:00.000183 main     Executable: /opt/VBoxGuestAdditions-5.1.16/sbin/VBoxService
00:00:00.000183 main     Process ID: 856
00:00:00.000184 main     Package type: LINUX_64BITS_GENERIC
[ 2164.975731] 00:00:00.001056 main     5.1.16 r113841 started. Verbose level = 0
[ 2164.983016] 00:00:00.008312 automount vbsvcAutoMountWorker: Shared folder 'vmshare_websvr_t3' already is mounted!
The obvious thing that jumps out is the last line complaining that the shared folder is already mounted, but I can't figure out why it thinks that or where the conflict is coming from.

If I turn off the auto mount option in VirtualBox then the /media folder isn't created and the error message doesn't occur either (as expected).

If I try the mount manually I get the following:
sudo mount -t vmshare_websvr_t3 /media/sf_vmshare_websvr_t3/
mount: can't find /media/sf_vmshare_websvr_t3/ in /etc/fstab
Again that's confusing as it's never had to be in fstab before.

Can anyone help?

Thanks
Last edited by socratis on 15. Jun 2018, 14:14, edited 1 time in total.
Reason: Marked as [Solved].
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Perryg »

sudo mount -t vmshare_websvr_t3 /media/sf_vmshare_websvr_t3/
sudo mount -t vboxsf vmshare_websvr_t3 /media/sf_vmshare_websvr_t3/ ( assuming that the folder "/media/sf_vmshare_websvr_t3" actually exists )

I might also suggest that you use /mnt and create a folder there instead of /media ?
Mark1978
Posts: 4
Joined: 9. Mar 2017, 14:34

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Mark1978 »

Thanks for the response and oops - missed that mistake, but unfortunately still doesn't work:

Code: Select all

mount -t vboxsf vmshare_websvr_t3 /media/sf_vmshare_websvr_t3/
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument
I also tried adding the sf_ prefix onto the share name (which I don't think is required) and got the following error:

Code: Select all

mount -t vboxsf sf_vmshare_websvr_t3 /media/sf_vmshare_websvr_t3/
/sbin/mount.vboxsf: mounting failed with the error: Protocol error
Usually I would use the /mnt folder but VirtualBox uses /media by default.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Perryg »

VirtualBox auto-mount uses /media because it treats it as removable media. Manual media should be mounted in /mnt

Let's do this. Remove the auto-mount from the guest settings and instead set it to permanent. I would also consider giving the share a simple name without all the special characters.
Next create a folder in /mnt like host-share ( /mnt/host-share ) on the guest.
then run the manual mount as in the example below.

sudo mount -t vboxsf <share-name> <mount-point>
replace the <share-name> and <mount-point> accordingly

Post the results here.
Mark1978
Posts: 4
Joined: 9. Mar 2017, 14:34

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Mark1978 »

Thanks for the explanation regarding media vs mnt. I'd like to just use the virtualbox automount but I'll take whatever works at this point :)

Renamed the share to "websvrt3" and created the "/mnt/host-share" folder. Results:

Code: Select all

mount -t vboxsf websvrt3 /mnt/host-share/
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument
I'm wondering if the guest additions didn't install properly but everything looked ok when I installed it.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Perryg »

mount -t vboxsf websvrt3 /mnt/host-share/

It could be the additions but first try it without the / on the end of the string.

mount -t vboxsf websvrt3 /mnt/host-share

As for mount vs. automount you can make the mount permanent using /etc/rc.local
You might need a wait statement but we can get into that later.
Mark1978
Posts: 4
Joined: 9. Mar 2017, 14:34

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Mark1978 »

That gave the same error but I had a thought and after some testing have identified the problem.

The folder path that was configured in VirtualBox was actually a symlink on the host machine. When I change this to be the real folder then everything starts working again, including the automount feature.

I had forgotten that it was a symlink as it's been working like that for ages on previous versions (and my windows vm still works with the symlink as well). No idea why it's changed or whether it was deliberate or not but at least I can continue working for now.

Thank you very much for your time and assistance - really appreciate it :)
Kenneth
Posts: 1
Joined: 10. Mar 2017, 18:34

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Kenneth »

I have having a similar problem. In my case, VirtualBox is now 5.1.14. I get the following error when I try the mount:
# mount -t vboxsf ingham /mnt
mount: unknown filesystem type 'vboxsf'
# rpm -qa | grep -i virt
virtualbox-guest-kmp-default-5.1.14_k4.10.1_1-3.1.x86_64
texlive-tex-virtual-academy-pl-2016.113.svn34177-30.2.noarch
virtualbox-guest-x11-5.1.14-3.1.x86_64
# uname -a
Linux linux-y57a 4.10.1-1-default #1 SMP PREEMPT Sun Feb 26 12:43:10 UTC 2017 (1ecd5af) x86_64 x86_64 x86_64 GNU/Linux

"ingham" is mapped to /home/ingham, which is not a symlink. I have both automount and permanent set.

Note that the guest additions are from the OpenSUSE Tumbleweed repo and not directly from the VIrtualBox web site. The one from there failed to install with a useless error message (one of several things might be wrong, none of which was). It also broke my display and left me at 60x480.

This was working fine in an earlier version of VirtualBox.
mik_tea
Posts: 1
Joined: 1. Aug 2017, 11:15

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by mik_tea »

Same issue here - shared folder that pointed to a simlink stopped working with
"/sbin/mount.vboxsf: mounting failed with the error: Invalid argument"
Once I've changed to a non-simlink it got going again.

Tried on 5.1.24 and 5.1.26, used to work in 5.1.10

Host Debian Buster 4.11.0-1-amd64 #1 SMP Debian 4.11.6-1 (2017-06-19) x86_64 GNU/Linux
Guest CentOS 2.6.32-696.6.3.el6.x86_64 #1 SMP Wed Jul 12 14:17:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Smoerrebroed
Posts: 6
Joined: 15. Jun 2018, 13:11

Re: Debian Jessie shared folder not mounting after upgrading to 5.1.16

Post by Smoerrebroed »

Identified issue still exists in 5.2.12. Did anybody ever create a bug report on this?

Edit: Found it! Ticket #17491

Apparently it's a feature although I am not sure what the purpose behind this is (following symlinks for Windows guests but not for Linux ones?). There is also an option that you can use to effect the (at leas from my side) expected behavior:

Put

Code: Select all

options vboxsf follow_symlinks=1
in file /etc/modprobe.d/vboxsf.conf

Cheers!
Last edited by socratis on 15. Jun 2018, 14:13, edited 1 time in total.
Reason: Added missing URL.
Post Reply