VirtualBox

Ticket #928 (new defect)

Opened 3 years ago

Last modified 4 months ago

Mounting share directory on Linux host result in Protocol error if default share name is used

Reported by: paulsiu Assigned to:
Priority: minor Component: guest additions
Version: VirtualBox 1.5.2 Keywords:
Cc: Guest type: Linux
Host type: other

Description

Host is Ubuntu 7.10. Guest is Linux Mint 4.0

I created a new shared directory using the GUI in a machine's setting. The GUI will prompt me to select a host directory for the shared directory. When I select the share directory, a share name is automatically generated. So if I select the directory "/home/paulsiu/vshare", the share name "vshare" is created.

If I attempt to mount the vshare using the following command in the Linux Guest I get the following error:

sudo mount -t vboxsf vshare /home/paulsiu/share /sbin/mount.vboxsf: mounting failed with the error: Protocol error

The syslog will have the error:

Oct 8 18:27:09 wxbuilder kernel: vboxvfs: sf_glob_alloc: vboxCallMapFolder failed rc=-102 Oct 8 18:27:09 wxbuilder kernel: sf_read_super_aux err=-71

Now suppose I go back into the GUI and change the "vshare" to "vshare2". The following mount command will work:

sudo mount -t vboxsf vshare2 /home/paulsiu/share

For some reason, whatever Virtualbox select as the default share name will always fail to mount. If you pick something else, it will work.

Change History

(in reply to: ↑ description ; follow-up: ↓ 2 ) 2007-11-27 21:45:57 changed by allentiak

Replying to paulsiu:

Host is Ubuntu 7.10. Guest is Linux Mint 4.0

It also happened to me. My host is a Debian stable/testing; the guest is Ubuntu 7.10. VirtualBox is also version 1.5.2. I followed your advise and it worked.

Thank you for reporting the bug.

(in reply to: ↑ 1 ) 2008-03-02 22:20:41 changed by abitgroggy

I followed your advise and it worked.

Works okay if you use the mount command directly or fstab to mount. I still have the problem on 1.5.6 with Ubuntu 7.10 when using autofs to mount in /misc. Works fine with Fedora 8. I found in Fedora 8 that fstab would not work as the vboxsf was not loaded yet, so switched to autofs.

(follow-ups: ↓ 4 ↓ 9 ) 2008-05-27 09:44:50 changed by frank

I don't think this is a bug in VirtualBox. There is a known issue with Linux mount: If there exists are directory or file of the same name as your host share then mount expands the full path of that file/directory and passed this expanded name as network share to the mount.vboxsf command which obviously will fail since that guest path is not known to the host. Try to use mount.vboxsf directly (this will work) for such corner cases.

(in reply to: ↑ 3 ) 2008-06-29 01:46:57 changed by Brandon

Replying to frank:

I don't think this is a bug in VirtualBox. There is a known issue with Linux mount: If there exists are directory or file of the same name as your host share then mount expands the full path of that file/directory and passed this expanded name as network share to the mount.vboxsf command which obviously will fail since that guest path is not known to the host. Try to use mount.vboxsf directly (this will work) for such corner cases.

What you say is exactly the case. The directory from which I attempted to run 'mount -t vboxsf stuff /media/stuff', had a symlink called stuff -> /media/stuff. Reading your post, I 'cd /" and ran the exact same command again. This time it worked!

As you suggest, it looks like it is a Linux bug (or feature?) and not a problem with VirtualBox of any version!

2008-07-08 08:51:56 changed by frank

  • guest changed from other to Linux.

2008-07-10 09:34:11 changed by frank

  • owner changed.
  • component changed from other to guest additions.

2008-10-03 20:22:34 changed by Rob

I am running VirtualBox 2.0.2 "Host Type:" Windows XP (SP3).

My "Guest type:" is Lenny (4.0 r4a) and the command as described in the VirtualBox Help works.

My "Machine Folders" "Name" is "Downloads" and my mount point is also Downloads. This works OK:

mount -t vboxsf Downloads /mnt/Downloads

WFM,
Rob


BTW: This "Bug Reporter" needs to specify more precisely the "Host" and "Guest" type. Describing the "Host" as "Linux" tells us NOTHING. If the "Host" is Cygwin, should we say the "Host" is Linux, probably not.


We need "Host" / "Guest" to give us:

"Processor Type" (EG: i686, arm9, G5 (Mac))
"Kernel Version" (EG: 2.6.26 (Linux), SP2 (Windows), 10.6 (Mac))
"OS Name" (EG: Debian, Red Hat, Windows, Snow Leopard (Mac))
"OS Version" (EG: 4.0 (Debian), rhl-9 (Red Hat))


AFAIK in Windows and Mac the "Kernel Version" and "OS Version" are the same since they are proprietary but with Linux we can have many "Flavors" and can compile our own Kernel. We also need to allow for oddballs (like Cygwin under Windows, or Linux and), don't forget coLinux.


For the "Bug Reporter" system to allow people to simply describe the OS as "Linux" (and require the reporter to be specific (if they choose to do so) later in their post) lumps these other peoples non-working Linux with my working Linux, an affront to us Debian (and Solaris) users :) .

2008-10-07 16:08:10 changed by frank

Rob, I don't understand what you mean by Host=Cygwin. The host operating system is just the kernel which is executing the VirtualBox process. Linux as host and/or guest is completely sufficient for categorizing the bug. If the kernel version is important, the reporter should add the correct version of course. The same applies to the Linux distribution.

(in reply to: ↑ 3 ) 2008-11-07 14:04:43 changed by internationils

Tried on 2.0.4 with sharenames equal to mountpoints and got this result:

nils@maruvbox:/mnt$ sudo mount -a /sbin/mount.vboxsf: mounting failed with the error: Protocol error /sbin/mount.vboxsf: mounting failed with the error: Protocol error

fstab: maru_c /mnt/maru_c vboxsf auto 0 0 maru_k /mnt/maru_k vboxsf auto 0 0

Renaming the destination directories to host_c and host_k did the trick.

2008-11-07 14:30:51 changed by frank

Yep, but AFAIR this is actually not a bug of the VBox guest tools. Just do an strace on the mount -a operation and look which parameters are actually passed to /sbin/mount.vboxsf.

2009-01-08 23:50:03 changed by FScheltens

SOLUTION:

Reading your post, I 'cd /" and ran the exact same command again. This time it worked!

I had to read everything in this topic thoroughly to catch this, and it solved the problem for me just fine. So i decided to put it clearly out in the open. Thank you mr. Brandon. IE give the command from the root directory, and not from the /mnt directory. Incidentally, i am using Linux Ubuntu 8.04 as guest, in windows xp3.

2009-05-15 19:22:36 changed by PerfMonk

Thanks for the solution,

Same symptoms here and same medicine worked well for me either.

I'm using Ubuntu 9.04 under VirtualBox 2.2.0r45856 with a Vista Pro host SP1. I'm stunted to see that this post started 2 years ago and it still not fixed...

WOW'''

2009-05-15 19:39:10 changed by PerfMonk

Sorry Guys,

I shoot myself in the foot! I want to apologize for last post.

The problem with Ubuntu 9.04 was that the module vboxvfs was not loaded. If I just load the module before (modprobe vboxvfs), then it works perfectly as described in the VirtualBox documentation.

So just do (as root) # : echo 'vboxvfs' >> /etc/modules and the module will be loaded at boot time and exit the problem...

Regards,

BT

2009-11-24 07:19:15 changed by Roel

Note that if you get this error, it may also be due to a missing shared folder. Recreate using menu 'Devices' > 'Shared Folders'. This could happen automatically after an upgrade. For instance, I upgraded from 3.0.12 to 3.1.0Beta2. I think this may even happen for forlders that were marked as 'Make Permanent'.


ContactPrivacy policy