VirtualBox

Opened 16 years ago

Closed 8 years ago

#928 closed defect (obsolete)

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

Reported by: Paul Siu Owned by:
Component: guest additions Version: VirtualBox 1.5.2
Keywords: Cc:
Guest type: Linux Host type: other

Description (last modified by Michael Thayer)

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 (21)

in reply to:  description ; comment:1 by Leandro Doctors, 16 years ago

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 comment:2 by grogd, 16 years ago

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 by Frank Mehnert, 16 years ago

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 comment:4 by Brandon, 16 years ago

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 by Frank Mehnert, 16 years ago

Guest type: otherLinux

comment:6 by Frank Mehnert, 16 years ago

Component: otherguest additions

comment:7 by Rob, 15 years ago

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 by Frank Mehnert, 15 years ago

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 comment:9 by nils, 15 years ago

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 by Frank Mehnert, 15 years ago

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 by F Scheltens, 15 years ago

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 by Bernard Tremblay, 15 years ago

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 by Bernard Tremblay, 15 years ago

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 by Roel, 14 years ago

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 by anish, 12 years ago

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

in reply to:  15 comment:16 by Michael Thayer, 12 years ago

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 by anish, 12 years ago

@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 by Michael Thayer, 12 years ago

And did you update the Guest Additions?

comment:19 by anish, 12 years ago

I dont remember.May be I did not

comment:20 by strmo, 11 years ago

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".

comment:21 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use