VirtualBox

Ticket #928 (new defect)

Opened 6 years ago

Last modified 18 months ago

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

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

Description (last modified by michael) (diff)

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

comment:1 in reply to: ↑ description ; follow-up: ↓ 2 Changed 6 years ago 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.

comment:2 in reply to: ↑ 1 Changed 6 years ago 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.

comment:3 follow-ups: ↓ 4 ↓ 9 Changed 6 years ago 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.

comment:4 in reply to: ↑ 3 Changed 6 years ago 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!

comment:5 Changed 6 years ago by frank

  • Guest type changed from other to Linux

comment:6 Changed 6 years ago by frank

  • Component changed from other to guest additions

comment:7 Changed 6 years ago 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 :) .

comment:8 Changed 6 years ago 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.

comment:9 in reply to: ↑ 3 Changed 5 years ago 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.

comment:10 Changed 5 years ago 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.

comment:11 Changed 5 years ago 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.

comment:12 Changed 5 years ago 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'''

comment:13 Changed 5 years ago 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

comment:14 Changed 4 years ago 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'.

comment:15 follow-up: ↓ 16 Changed 2 years ago by anish

guys...I got rid of this bizarre error by a bizarre solution...

Step 1: make the shared folder and change the name of the shared folder the name you wish (ensure that all the letters are lowercase!!! very important)

Step 2:execute the command sudo mount -t vboxsf share mountpoint

I executed sudo mount -t vboxsf vb /home/mount vb:name of the shared folder /home/mount:my mount point..done...no errors for me...I'm sleeping now

comment:16 in reply to: ↑ 15 Changed 2 years ago by michael

  • Description modified (diff)

Replying to anish:

guys...I got rid of this bizarre error by a bizarre solution... [Snip]

Are you still seeing this with the latest version of VirtualBox and updated Additions?

comment:17 Changed 2 years ago by anish

@Micheal, yes..I run the most recent edition of virtualbox. When I try to update(help->check for updates in Vbox Manager), it says that I am already using the latest version.

comment:18 Changed 2 years ago by michael

And did you update the Guest Additions?

comment:19 Changed 2 years ago by anish

I dont remember.May be I did not

comment:20 Changed 18 months ago by strmo

I had the same problem with Virtualbox version 4.1.12.

In Ubuntu 12.04 I tried to mount shared folder into debian weeze 32. I have installed Virtualbox guest additions of the same version into VM.

After trying to mount (mount -t vboxsf share /mnt/) I got:

mounting failed with error: Protocol error

dmesg | tail says:

sf_read_super_aux = -71

Then I tried to use name "install" instead of "share" (according to anish advise)

mount -t vboxsf install /mnt/

and it worked.

So according to me the only issue to fix is to show "device not found" instead of "Protocol error".

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use