Id ошибки brokensharedfolder

#15932

closed


defect


(duplicate)

Reported by: Owned by:
Component: other Version: VirtualBox 5.1.6
Keywords: Cc:
Guest type: other Host type: other

I am using CentOS7 as the host and Windows 10 as the guest. I have a shared folder on the host that is mounted by the guest. After a random period of time, Explorer or anything accessing this shared folder becomes «Not responding» within Win10. I get the Win10 «waiting» ring. Unfortunately, I never get an error message within Windows 10 or in the log files of CentOS7. To troubleshoot it, I tried to safe shutdown and/or reboot the Win10 guest, but it will not successfully shutdown. It must be hard booted in order to resolve.

When I try to «modify» the Shared folder settings on the host, I get an error that says «Broken Shared Folder». I do not know how to provide any more information like debug information or logs but would be willing to provide any details if instructed how.

Собственно возникла маленькая проблемка… помимо убогой производительности общих папок, с коей я уже смирился, был замечен такой глюк. При изменении какого либо файла из windows-хоста, гостевая система (Debian) все равно отдает мне старую версию файла или же просто ломает файл (скажем JS файлы режутся). Помогает только umount/mount — но после каждой правки делать это не столь удобно.

гостевая система Debian используется преимущественно для LAMP разработки. Общая папка содержит файлы для всех хостов апача.

Желательно разобраться именно с VirtualBox (остальные решения мне не так сильно нравятся… хотя перепробовал уже и VMware и coLinux, хотя последний не подходит ибо под 64 бита вроде бы пока оно не полностью работает….)

p.s. Если кто либо может мне подсказать как решить проблему с большой задержкой при доступе к файлам из гостевой ОС — тоже было бы не плохо… но с этим я пока жить могу.


Go to virtualbox


Shared Folders broken after upgrading


Solved

On a Debian 10 client and Win10 host, Virtualbox features were working fine including shared folders. I ran apt update and apt upgrade, rebooted and my video was fucked as well as the Shared Folders feature.

To fix Shared Folders, I’ve tried reinstalling GuestAdditions, removing the Shared Folders entry in the VBox settings and rebooting the guest. Then added the Shared Folder entry back and rebooted again.

I tried using a new directory for the Shared Folder and rebooted while standing on my head. I was sure the latter would work.

Searches on this sub suggested to check disk space, there is plenty. There are no errors installing GuestAdditions.

When attempting to mount manually:

root@debian:/media/sf_shared# mount -t vboxsf shared /media/sf_shared
/sbin/mount.vboxsf: mounting failed with the error: No such device
root@debian:/media/sf_shared# 

Versions:

VirtualBox 6.1.2r135662

Windows Version 10.0.18363.592

Debian 10.3

Shared Folders Settings: Folder Path: d:\VirtualBox\Shared

Folder Name: shared

Read-only: unchecked

Auto-mount: checked

Mount point: blank

Make Permanent: Checked

Any tips, suggestions, thoughts on how to get the Shared Folders working again?

The issue is that your user «mat» is not in the same group as «vboxsf». This group «vboxsf» is the group which has read/write permissions to that folder. Also the root has permission to that folder because its in the group «vboxsf».

What you need is to add your user «mat» to the same group. Start your terminal and write the following line:

sudo usermod -aG vboxsf mat
  • sudo — because you need root permission
  • usermod — the command to change the user properties
  • -a means append to the group
  • -G means you will supply the group name now
  • vboxsf is the group name that you want your user to be in
  • mat is your username

A reboot, or a logout, may be required for changes to take affect.

After this operation you can verify that your user is indeed in the vboxsf group by doing this:

cat /etc/group | grep "vboxsf"

you will see your username there.
Now you shall be able to access that folder. If any issue, just comment here and I will tell you alternative methods.

Also, if all of this sounds too geeky, you can do the same thing using the graphical tools. One guide is here http://www.howtogeek.com/75705/access-shared-folders-in-a-virtualbox-ubuntu-11.04-virtual-machine/

Also, in new virtual box — 4.3.20 I guess, they have this new feature of drag and drop where you can just drag files and folders to your virtual machine just by dragging. Isn’t that nice. :)

I have Ubuntu 10 as the guest OS on a Windows 7 machine. I have been trying to setup shares through VirtualBox, but nothing is working. First, I create the share in VirtualBox and point it to a Windows folder. Then I try to mount the drive in Linux, but I keep getting

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

I have read so many solutions to this, but none seem to work. I have tried:

  • Using the mount.vboxsf syntax
  • Reinstalling VBox additions
  • Rebooting
  • Enabling and trying as root account

I made a share called «Test» in VBox Shared folders. Then I made a directory in ubuntu named «test2». Then I tried to execute this command:

sudo mount -t vboxsf Test /mnt/test2

Any other ideas?

Zanna's user avatar

Zanna

68.6k55 gold badges212 silver badges322 bronze badges

asked Mar 14, 2011 at 23:18

skaz's user avatar

1

In order to use shared folder functionality few prerequisites need to be met:

  • Make sure that Guest Additions are properly installed on the guest OS.
  • Users in a guest Ubuntu must be in the group vboxsf to be able to access shares.
  • Define a directory on the host that will be used in the virtual machine using the settings dialogue of Virtual Box.

Depending on host or guest OS the following may also be needed:

  • Do not share personal folders like /home/username or My Documents
  • Avoid special characters or empty spaces in the path to the shared folder, especially if the host or VM is a Windows machine
  • Use different names for share and mountpoint
  • Create a mountpoint on the guest OS (best in your HOME directory).

Testing shared folders functionality can be done by creating a shared directory on the host (e.g. C:myshare), define this as a shared folder for your guest system in Virtual Box settings (e.g. share), create a mount point in your guest os (e.g. mkdir /home/username/host) and mount this in the guest OS with the command:

sudo mount -t vboxsf -o uid=1000,gid=1000 share /home/username/host

where the option -o makes sure that you will have access to the mount (that will otherwise be owned by root).

For further information on shared folders see also the Virtual Box User Manual.

Files or directories can also be shared over the network by using Samba on the host and the guest.

answered Mar 15, 2011 at 8:13

Takkat's user avatar

TakkatTakkat

140k53 gold badges307 silver badges422 bronze badges

20

I also met this trouble. I found that the shared folder were already mounted at /media/sf_share.

I tried to delete /media/sf_share, but I couldn’t.

So I deleted shared folder «share» in my home directory.

$ rm -r ~/share

And then switch to root user with the following way:

$ sudo -i

Create softlink/shortcut to the /media/sf_share folder that owns by root user modify the ownership of softlink with chown command. Exit from root user to normal user

# ln -s /media/sf_share /home/username/share
# chown username.username /home/username/share
# exit
logout

$ chmod 777 ~/share

You can see the files in Windows through the shared folder.
And username must be a member of group vboxsf.

Community's user avatar

answered Sep 18, 2011 at 7:03

Old Urologist's user avatar

2

Here is what worked for me without any problem

I figured it out that, actually my user name was not in vboxsf group. Following two commands will help to get the group info:

grep "vboxsf" /etc/group    
grep "saurav" /etc/group

So I added saurav (me) to the vboxsf group using following command:

sudo usermod -a -G vboxsf saurav 

Then restarted the virtualbox and then.. Jumped from my placed.. :D :D Everything worked fine without any problem.

Please comment if any one still having any problem..

answered Apr 7, 2016 at 7:00

Saurav Kumar's user avatar

Saurav KumarSaurav Kumar

14.7k15 gold badges62 silver badges76 bronze badges

3

I also struggled a lot with the mounting, and tried everything I come up with in the interwebz but I finally found a very weird workaround to solve it! My guest is Ubuntu 13 and my host is Windows 7.

Change to the media folder and from there type user@os:/media$ sudo mount -t vboxsf share /home/username/folder

Yeah, that’s it. But I don’t understand how come it only works if it’s done from the media folder. If someone knows please kindly explain us below. Thanks.

P.s. Editing my /etc/rc.local to do the automounting at startup doesn’t work for me.

answered Jan 3, 2014 at 14:18

BringBackCommodore64's user avatar

3

With VirtualBox 5.1.20 running on Windows 10, and Ubuntu 16.04 as the guest OS with GuestAdditions 5.1.20 installed, I couldn’t mount the shared folders from the command line. The mount commands failed, with mentions of Protocol Error and sf_read_super_aux err=-22.

Eventually I found https://www.virtualbox.org/ticket/16670 «mount.vboxsf symlink broken». I followed one of the workarounds there, to correct the symlink for mount.vboxsf, and it all worked. My approach was to do:

mv /sbin/mount.vboxsf /sbin/mount.vboxsf-orig
ln -s /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

The commands need to be done by root. So, because it was Ubuntu, I added «sudo » at the beginning of each line to do the command as root. Other flavors of Linux have other ways of doing that.

As an aside, there was a similar symlink problem reported in virtualbox’s Ticket #12879 «Can’t mount shared folders with guest additions 4.3.10» in 2014, that was fixed the following month.

2017-04-27

answered Apr 27, 2017 at 18:26

J Cumming's user avatar

4

For me, the problem was that I was a goose, and I’d forgotten that I’d removed the entry from my Shared Folders list in VirtualBox (Machine→Settings→Shared Folders).

I’m just throwing this in here, in case anybody else is ever similarly mislead by ‘Protocol error’.

:honk: 😉

answered Aug 7, 2018 at 16:17

Michael Scheper's user avatar

Tried all the aforesaid and nothing worked for me.
Lastly I created a new transient folder «Shared» with «Make Permanent» and «Auto Mount» enabled. And then I run the command

sudo mount -t vboxsf -o uid=1000,gid=1000 Shared /mnt/sharedvm

It worked for me. No error this time.

boardtc's user avatar

answered Jul 6, 2016 at 14:23

Pankaj's user avatar

I tried a few answers and then saw void’s comment saying he restarted the Linux guest OS and re-mounted.

Worked for me. :)

Eliah Kagan's user avatar

Eliah Kagan

116k54 gold badges312 silver badges488 bronze badges

answered Jun 10, 2020 at 14:18

yannick1976's user avatar

My shared folder was working and after rebooting my host, it wasn’t.

By changing the name of the shared folder from Shared to Shared2 it worked.

config.vm.synced_folder "/Users/username/Dropbox/Shared", "/Shared2"

No idea on what happened and why nor how to fix.
System with no global mutable state like Nix do have a point.

answered Feb 15, 2017 at 11:30

nicolas's user avatar

Personally I faced the same error message and the problem was related to the fact I did a typo related to the folder located on the host machine and which I set as a shared folder from within the virtual machine thanks to the guest additions.

So the right command is:

sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) shared_folder_located_in_host_machine path_to_mounting_folder_inside_the_virtual_machine

This fixed the error message.

answered Apr 23, 2018 at 14:49

Billal Begueradj's user avatar

Billal BegueradjBillal Begueradj

5,40910 gold badges38 silver badges56 bronze badges

For me it was the wrong version of guest-additions.

I moved my whole VM from one laptop (which ran VirtualBox 5.8/something) to another laptop with VirtualBox 6.0. Everything worked except the mounting of shared folder.

I just started VM, clicked on Devices -> Insert Guest additions CD image... and followed instructions. It cribbed a bit about presence of older version of guest additions, but then removed it and installed the new one on second attempt. Reboot and works.

answered Aug 27, 2019 at 20:53

Kashyap's user avatar

KashyapKashyap

3513 silver badges10 bronze badges

Skip to content


Прочитано:
1 695

Понадобилось мне перекинуть файлы из основной системы в гостевую (в роли гостевой выступала система Ubuntu 12.04 Desktop amd64, конечно это не важно, но всё же). Дополнения гостевой операционной системы были соответственно установлены из ходя из этого доступна опция монтирования через «Общие папки…»

Итак, в консоли командной строки (вызывается сочетание клавиш – Ctrl + Alt + T) набираю:

ekzorchik@server3:~$ sudo mount -t vboxsf -o rw ekz /media/ekz

/sbin/mount.vboxsf: mounting failed with the error: Protocol errorошибка подключения «Общей папки…»

Меню настройки "Общих папок" между основной системой и гостевой

у меня было настроено, так:

Подключение общей папки с основной системы

Ошибка заключалась в том что я не правильно указал имя общего ресурса настроенного через интерфейс «Общие папки», исправляем и подключаем:

ekzorchik@server3:~$ sudo mount -t vboxsf -o rw server1 /media/ekz

Вывод командой ls отобразит наличие файлов если они там есть в директории ekz:

ekzorchik@server3:~$ ls /media/ekz

Zeleznuy.Chelovek.2.2010.Xvid.DVDRip.Kinozal.TV.avi

Проблема решена и разобрана, будьте внимательнее и у Вас не будет проблем. На этом всё, удачи. С уважение, ekzorchik.


Virtual box is a great tool for Java developer to run Docker and Linux on Windows Machine, especiall for them who need to develop and debug Java program in Linux environment. I use Oracle’s virtual machine, VirtualBox to run the Linux operating system from my Windows machine. It’s the most simple way to have two operating systems on your laptop or PC. Since I run most of the Java programs in Linux, VirtualBox gives me a nice interface to run UNIX commands right from the Windows box. This blog post is about the mounting of a shared folder failed error in Oracle’s Virtualbox VM. It was working fine the day before yesterday and now, after I restarted my virtual box and tried to mount my shared folder, I was greeted by this error: «/sbin/mount.vboxsf: mounting failed with the error: Protocol error»

I was using the following command to mount my shared folder on VirtualBox:

$ mount -t vboxsf mountfolder /home/devInHost/mountfolder

I was running Oracle’s VirtualBox 6.0 version with the guest operating system as RedHat Linux 8 and host OS like Windows 10.

There was nothing different I was trying, I had run this command successfully numerous times, but it was not working today.

I looked all over the internet for a solution and tried things like running this command after doing



or
$ cd ~



but with no luck. After a bit of struggle, I found that my virtual box has no shared folder.

I went to Settings -> Shared Folders and there was nothing on it, even though I had specified shared folder in the previous run. I later realized that I had not made it permanent, that’s why when I restarted my VirtualBox, there was no shared folder.

Once I specified the shared folder the command ran fine, even without restarting the virtual box.

mounting failed with the error: Protocol error VirtualBox

Summary

Here is the summary of what happened, what was the root cause of the error, and how I fixed it.

What I was trying to do: 
mounting shared folder on Linux guest OS inside Oracle VirtualBox.

Command:

$ mount -t vboxsf mountfolder /home/devInHost/mountfolder



Error:
«/sbin/mount.vboxsf: mounting failed with the error: Protocol error»

Cause:
There was no shared folder. I had before the last run but it wasn’t permanent so when I restarted the Virtual box, it got reset.  You can check this by going to Settings -> Shared Folders

Solution:
Specify the new shared folder and re-run the command $ mount -t vboxsf mountfolder /home/devInHost/mountfolder again. It will work fine, no need to restart the Virtual box again.

Thanks, I hope this can save some time for you, when you get this error, don’t forget to check your shared folder settings in the virtual box before looking into the internet for the solution.

Other Tech Debugging and Troubleshooting Guide You May Like

  • How to solve java.lang.UnsatisfiedLinkError: no ocijdbc11 in Java [solution]
  • java.net.SocketException: Failed to read from SocketChannel: Connection reset by peer [fix]
  • How to solve java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver in Java? [solution]
  • java.net.BindException: Cannot assign requested address: JVM_Bind [fix]
  • How to fix java.lang.ClassNotFoundException: org.postgresql.Driver error in Java? [solution]
  • Fixing Unsupported major.minor version 53.0 Error in Java [solution]
  • How to solve java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver [solution]
  • How to solve java.lang.ClassNotFoundException in Java [guide]
  • Exception in thread «main» java.lang.ExceptionInInitializerError in Java Program [fix]
  • java.net.SocketException: Too many files open java.io.IOException [solution]
  • 2 ways to solve Unsupported major.minor version 61.0 error in Java [solutions]
  • java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver [solution] 
  • java.io.IOException: Map failed and java.lang.OutOfMemoryError: Map failed  [fix]
  • java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory? [solution]
  • org.hibernate.MappingException: Unknown entity Exception in Java [solution]
  • java.lang.ClassNotFoundException:org.Springframework.Web.Context.ContextLoaderListener [solution]
  • Exception in thread «main» java.lang.ArrayIndexOutOfBoundsException: 1 [solution]
  • How to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in Java MySQL? [solution]

Thanks for reading this  Virtual box debugging tutorial so far. If you find my
solution useful, please share this article with your friends and
colleagues. 

  • Reply with quote

[Solved] mount.vboxsf: Protocol error

os: Windows 10 pro 1709
laptop: Lenovo Thinkpad E570
Virtualbox: 5.2.12

Hello.
When I try to mount the shared folder I get this error:
mount.vboxsf: mounting failed with the error: Protocol error

error.PNG
error.PNG (41.85 KiB) Viewed 7328 times

I have Guest Addition installed
I have shared folder on Desktop but if I try to open an error is displayed.

shared folder.PNG
shared folder.PNG (40.67 KiB) Viewed 7328 times
shared folder permission.PNG
shared folder permission.PNG (64.13 KiB) Viewed 7328 times

I need some help.
Thanks

Edoardo

edx
 
Posts: 12
Joined: 22. May 2018, 11:46


  • Reply with quote

Re: mount.vboxsf: Protocol error

Postby mpack » 30. May 2018, 10:52

You are asking a question about a Linux Guest error message by posting in the Windows Hosts forum — perhaps not the best choice if you wanted a quick answer.

Providing a VM log file would have been a good move too.

I will move the topic. Provide a VM log file by right clicking the VM in the manager (the VM must be fully shut down). Select «Show Log» and save «VBox.log» (no other file) to a zip file. Attach the zip here.

mpack
Site Moderator
 
Posts: 38198
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

  • Reply with quote

Re: mount.vboxsf: Protocol error

Postby edx » 30. May 2018, 11:04

You are asking a question about a Linux Guest error message by posting in the Windows Hosts forum — perhaps not the best choice if you wanted a quick answer.

I’m sorry, you’re right.
Thanks for the answer, here’s the Log file you requested.

edx
 
Posts: 12
Joined: 22. May 2018, 11:46

  • Reply with quote

Re: mount.vboxsf: Protocol error

Postby mpack » 30. May 2018, 12:31

The log shows that everything is correct from the VM side (the GAs are loaded, the folder exists etc):

VBox.log wrote:00:00:31.337917 VMMDev: Guest Log: 00:00:00.028534 automount vbsvcAutoMountWorker: Shared folder ‘VBORACLE’ was mounted to ‘/media/sf_VBORACLE’

So I assume that you have a permissions problem in the guest. I’m not a Linux user, so I can’t tell you what that is. I can see that the user manual «mount» command does not use sudo, and using sudo seems to imply that the folder will only be mounted for root access — so perhaps this has to do with default protections you’ve configured in Oracle Linux.

mpack
Site Moderator
 
Posts: 38198
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

  • Reply with quote

Re: mount.vboxsf: Protocol error

Postby edx » 30. May 2018, 12:41

I don’t know how, but I solved. Probably when I restarted my host… :lol:

edx
 
Posts: 12
Joined: 22. May 2018, 11:46

  • Reply with quote

Re: [Solved] mount.vboxsf: Protocol error

Postby mpack » 30. May 2018, 12:44

I see. Thanks for reporting back.

mpack
Site Moderator
 
Posts: 38198
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

  • Reply with quote

Re: [Solved] mount.vboxsf: Protocol error

Postby Hiro Protagonist » 15. Jan 2020, 19:55

I’ve also had this problem, and it seems to be due to checking «Auto mount», which gives a «BrokenSharedFolder» warning when you close the dialog box, and then «Protocol error» if you try and mount the folder. I found that if you just check «Make permanent» without «Auto mount» and put the command to mount the folderin /etc/rc.local, it works.

Hiro Protagonist
 
Posts: 25
Joined: 4. Jul 2013, 17:46


Return to Linux Guests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 19 guests

Setup: VirtualBox 4.3.26, Win 7 SP1 host, Debian jessie 8.0 (stable) guest.

In VirtualBox Manager, select Shared Folders Settings… in the Devices drop-down menu.

In the resulting pop-up window, select Machine Folders in the Folders List and then click the «Add a New Shared Folder Definition» button (the blue folder with a green «+» sign icon to the right of the Folders List).

In the resulting Add Share pop-up form, click on the down-arrow button in the Folder Path field, and then select Other. A Browse For Folder pop-up window will appear.

(In my case, I had just added another hard drive to my workstation to be used for a dedicated share, already formatted for NTFS, with a volume name of «share», and mounted as «G:». So I clicked the arrow next to Computer, selected drive G: and then clicked the OK button.)

(In your case you should select whatever folder or drive you intend to share, then click the OK button.)

When you’ve made your selection and clicked the OK button, VirtualBox Manager will fill in the Folder Path and Folder Name fields of the Add Share form. Leave the Folder Path field alone, but you can change the Folder Name if you like — just be sure to remember it for later.

Finish up the Add Share form by selecting the Make Permanent check box, but be sure to leave the Auto-mount check box cleared — we’re going to take care of mounting later. (And of course, if you want to make the folder or drive read-only, then go ahead and check the Read-only box.) Then click the OK button.

The newly-configured share should now appear as an entry under Machine Folders in the Folders List. Click the OK button.

In order to mount this share during boot (startup) we need to add a mount definition line to /etc/fstab in our Debian jessie guest installation. This edit needs to be done either as root or via sudo, for example:

sudo nano /etc/fstab

(I personally used vi, but because nano is the default editor on Debian jessie I specified it in the above example.)

To mount this share in my home directory, with its ownership and group set to my personal UID and GID, I added the following definition to /etc/fstab:

share /home/conib/share vboxsf comment=systemd.automount,uid=conib,gid=conib,noauto 0 0

(Note that there are no spaces around the «=», «.», or «,» characters.)

An /etc/fstab definition is in the form

<Device> <Mount Point> <Type> <Options> <Dump> <Pass>

(Note that there should be whitespace — space(s) and/or tab(s) — between the fields of the definition, but no whitespace within a field.)

The «Device» field should be set to the Folder Name we specified via VirtualBox Manager Add Share. I had changed the default «G_DRIVE» to «share».

The «Mount Point» is a directory path spec that must already exist but should be empty. (That is, anything already present in that directory will be hidden by what you’re mounting on top of it.) I had created a new, empty subdirectory named «share» in my home directory.

The «Type» is «vboxsf».

The «Options» (comment=systemd.automount,uid=conib,gid=conib,noauto) were the tricky bit, and took a bit of trouble to get working for this setup.

Set «Dump» to 0 unless you know you want it set to something else.

And since we don’t want fsck checking this share, set «Pass» to 0 too.

When you’ve added the definition line to /etc/fstab, reboot your Debian guest and confirm that you can see the files and subfolders of your Share.

HTH.

i try mount VB shared filder (host is windows)

mount -t vboxsf share ~/host
/sbin/mount.vboxsf: mounting failed with the error: Protocol error

1) the operating systems on both host and guest machine
Host : windows 7
Guest : debian

2) How you are sharing the folder.
i setup it on Devices/shared folders settings — virtualbox configuration.
i setup E:/ as Tansient Folder

3) Have you installed Virtual Box Guest Additions on the guest?
yes

4) Which version of virtual box you are using
4.3.8

5) Have you installed the Virtual Box extension pack from their website? We need more information to be able to help.

i not install extension pack, only from menu quest additions then in virtual debian as root install it.

asked Mar 22, 2014 at 10:28

Developer's user avatar

DeveloperDeveloper

2672 gold badges3 silver badges8 bronze badges

3

OK, just experimented with Debian Wheezy guest on a Windows XP host (VirtualBox 4.3.8).

Prerequisites:

  • Host:

    • Create a shared folder (using the UI or the vboxmanage command).
    • Notice that it has both the pathname and the «shortname».

      For instance, I might share the folder C:Documents and settingsUser making it available under the name user.

  • Debian guest:

    • Have virtualbox-guest-dkms installed, compiled for the current kernel (done automatically; if not, install the matching linux-headers package and run dpkg-reconfigure virtualbox-guest-dkms).
    • Have virtualbox-guest-utils to make mount.vboxsf available.

Now on your guest you can do

# mkdir /tmp/foo
# mount.vboxsf user /tmp/foo

or, alternatively, the last step can be spelled as

# mount -t vboxsf user /tmp/foo

Notice the usage of the short name for the «device» argument in the call to mount.

The answer is based on this comment in the thread dealing with the similar issue elsewhere on SO.

Community's user avatar

answered Mar 24, 2014 at 13:34

kostix's user avatar

kostixkostix

2,7781 gold badge14 silver badges20 bronze badges

The below is based on this, this, this, and this, with my additions:

  1. Login as root (or use sudo)
  2. Update your APT database with apt-get update
  3. Install the latest security updates with apt-get upgrade
  4. Install required packages with apt-get install build-essential module-assistant
  5. Configure your system for building kernel modules by running m-a prepare
  6. Click on Install Guest Additions… from the Devices menu, then run mount /media/cdrom
  7. Go to VirtualMachine’s Settings->General->Advanced->Shared Clipboard (Bidirectional) and Settings->General->Advanced->Drag'n'Drop (Bidirectional)
  8. Run sh /media/cdrom/VBoxLinuxAdditions.run,
  9. Install pacapt as pacman:
    wget -O /usr/local/bin/pacapt https://github.com/icy/pacapt/raw/ng/pacapt
    chmod 755 /usr/local/bin/pacapt
    ln -sv /usr/local/bin/pacapt /usr/local/bin/pacman || true
  10. Install other required packages (answer Y when asked Y or I : install the package maintainer's version):
    for i in virtualbox-guest-utils virtualbox-guest-additions virtualbox-modules virtualbox-host-modules virtualbox-source virtualbox-host-source; do echo $i ; pacman -S $i ; echo "------------" ; done
  11. Append vboxsf to /etc/modules
  12. Run modprobe vboxsf
  13. Check success with: mount -t vboxsf tmp ~/shared/tmp/ (assuming your shared folder is defined as below)
    Note: if you get a /sbin/mount.vboxsf: mounting failed with the error: No such file or directory or similar, it means you didn’t create the mount point sub-directory.

shared folders

~/shared/tmp

VBoxGuestEditions.ISO

Community's user avatar

answered May 7, 2015 at 0:17

boardrider's user avatar

boardriderboardrider

1,0156 gold badges17 silver badges36 bronze badges

19th April 2009

These times, my virtualisation needs are being well served by VirtualBox 2.2. It may be the closed source variant but I have no complaints about it. Along with a number Windows VM’s, I also have one running Ubuntu 9.04 and, for the first time, I seem to have VirtualBox’s Guest Additions playing with a Linux guest as they should. Even the Shared Folders functionality is working.

However, I did get one problem when I tried out the last feature for the first time. The procedure is to issue a command like the following in a terminal session after creating the requisite directory in the file system and adding a host directory as a shared folder:

sudo mount -t vboxsf Music /mnt/host_music/

Above, Music is the name of the folder in the VirtualBox manager and /mnt/host_music in the directory in the guest file system. However, this returned the message at the head of this post at that first attempt:

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

The solution thankfully turns out to be an easy one: reinstalling the Guest Additions and that certainly did the trick for me. The cause would appear to have been an update to Ubuntu and 9.04 is understandably in a state of flux at the moment (I suspect kernel upgrades because of my previous experiences). Regardless of this, it is good to know that it’s a problem with a simple fix and I am seeing the niceties of a larger virtual screen system together automatic grabbing and releasing of the mouse cursor too. There may be a chance to explore the availability of these sorts of features to other Linux guests but I have other things that I should be doing and there’s sunshine outside to be enjoyed.

I’m a newbie in linux. I installed Fedora 16 OS as guest in virtualbox on Window 7. Now, I want to access share folder from Fedora. Here is something I did:

  • Install guest addtion [OK]
  • Make share folder link to virtualbox [OK]. Share folder path in Window 7: D:share_folder_vm
  • In terminal program in fedora, I just run some commands:

    [hoangphi@localhost ~]$ su
    Password: 
    [root@localhost hoangphi]# cd Desktop/
    [root@localhost Desktop]# mkdir share_folder
    [root@localhost Desktop]# sudo mount -t vboxsf D:share_folder_vm share_folder
    /sbin/mount.vboxsf: mounting failed with the error: Protocol error
    [root@localhost Desktop]# 
    

I got this message: /sbin/mount.vboxsf: mounting failed with the error: Protocol error

share_folder_vm is the folder in Win7 Host and share_folder is the folder in Fedora Guest.

My question: How can I fix this problem?

Vadim Kotov's user avatar

Vadim Kotov

8,0048 gold badges48 silver badges62 bronze badges

asked Apr 7, 2012 at 19:15

PhiVH's user avatar

0

Install Oracle Guest Additions:

[host-hotkey (usually right Ctrl)] + [d],

Then:

sudo /media/VBOXADDITIONS_4.*/VBoxLinuxAdditions.run

You can now enjoy:

  • A guest that can run at native screen resolution
  • Ability to share files between host and guest
  • Share the clipboard (allowing you to copy and paste between host and guest).

To share folders set them up to be shared. Consider the permissions. Note that the host file permissions are transient. IOW if you can’t write to file on host, the guest can’t either.

After setting up the file to be shared create a destination if you don’t have one:
mkdir -p ~/destination

Now mount it under the name you configured it with:

sudo mount -t vboxsf myFileName ~/destination

As an extra tip you can really exploit this feature to do things like:
— Use guest subversion client to create repository to mounted directory (you won’t have a full svn client but the repo can be used in an IDE on the host).
— I personally use my guest to download and unpack binaries like Tomcat to a targeted mount. Yes you can use Linux to install things on Windows!

To unmount all shares:

sudo umount -f -a -t vboxsf

APC's user avatar

APC

143k19 gold badges172 silver badges281 bronze badges

answered Jun 7, 2012 at 16:56

thejartender's user avatar

thejartenderthejartender

9,3096 gold badges33 silver badges51 bronze badges

4

This thread has some great tips. However….

@GirishB’s answer isn’t correct — sorry. Jartender’s is best.

Also, every post in here seems to assume you’re logging in to the Linux guest as root, except for @tomoguisuru. Yuck! Don’t use root, use a separate user account and «sudo» when you need root privileges. Then this user (or any other user who needs the shared folder) should have membership in the vboxsf group, and @tomoguisuru’s command is perfect, even terser than what I use.

Forget running mount yourself. Set up the shared folder to auto mount and you’ll find the shared folder — it’s under /media in my OEL (RH and Centos probably the same). If it’s not there, just run «mount» with no arguments and look for the mounted directory of type vboxsf.

Terminal showing 'mount' and where to find mounted shared folder

answered Apr 6, 2014 at 15:31

Andrew Wolfe's user avatar

Andrew WolfeAndrew Wolfe

1,96017 silver badges25 bronze badges

1

I just figured. You need to add a shared folder using VirtualBox before you access it with the guest.

Click «Device» in the menu bar—>Shared File—>add a directory and name it

then in the guest terminal, use:

sudo mount -t vboxsf myFileName ~/destination

Dont directly refer to the host directory

answered Feb 18, 2013 at 13:23

Chen Sturmweizen's user avatar

2

There’s a simpler way I found when running Linux Mint.

  1. Ensure you install the Guest Additions from the command line and that you have the folder(s) shared with «automount» and «make permanent» settings selected within «Shared Folders» tab of the Machine Settings
  2. Launch the User management application from Application/Settings/System Setting/ menu selection (requires sudo) from within the Mint menu
  3. In the «Privileges and Groups» tab, check the box next to the «vboxsf» group, and then apply and ok your way back out.

Any user within the vboxsf group has full access to any shared folders on each boot with no manual mounting or unmounting

I usually do the following in addition to the above just to have quick access

  1. Open the Dolphin file manager and navigate to /media/
  2. Right-Click on the shared folder and click «Add to Places»

Jens Erat's user avatar

Jens Erat

37.1k16 gold badges80 silver badges96 bronze badges

answered Apr 25, 2013 at 21:01

Michael's user avatar

MichaelMichael

1443 silver badges11 bronze badges

You probably need to change your mount command from:

[root@localhost Desktop]# sudo mount -t vboxsf D:share_folder_vm share_folder

to:

[root@localhost Desktop]# sudo mount -t vboxsf share_name share_folder

where share_name is the «Name» of the share in the VirtualBox -> Shared Folders -> Folder List list box. The argument you have («D:share_folder_vm») is the «Path» of the share on the host, not the «Name».

answered May 16, 2014 at 22:05

Wil S's user avatar

Wil SWil S

3452 silver badges12 bronze badges

May be this can help other guys:
I had the same problem, and after looking with Google I found that can be because of the permissions of the folder… So, you need first to add permissions…

$ chmod 777 share_folder

Then run again

$ sudo mount -t vboxsf D:share_folder_vm share_folder

Check the answers here: Error mounting VirtualBox shared folders in an Ubuntu guest…

Community's user avatar

answered Jan 15, 2013 at 16:14

Jesfre's user avatar

JesfreJesfre

6908 silver badges11 bronze badges

1

VirtualBox version has many uncompatibilities with Linux version, so it’s hard to install by using «Guest Addition CD image». For linux distributions it’s frequently have a good companion Guest Addition package(equivalent functions to the CD image) which can be installed by:

sudo apt-get install virtualbox-guest-dkms

After that, on the window menu of the Guest, go to Devices->Shared Folders Settings->Shared Folders and add a host window folder to Machine Folders(Mark Auto-mount option) then you can see the shared folder in the Files of Guest Linux.

answered Dec 11, 2017 at 9:46

Tin Luu's user avatar

Tin LuuTin Luu

1,54716 silver badges22 bronze badges

These are the steps to share a folder from Windows to Linux Virtual Box

Step 1 : Install Virtual Box Extension Pack from this link

Step 2: Install Oracle Guest Additions:

By pressing -> Right Ctrl and d together

Run the command
sudo /media/VBOXADDITIONS_4.*/VBoxLinuxAdditions.run

Step 3 : Create Shared Folder by Clicking Settings in Vbox
Then Shared Folders -> + and give a name to the folder (e.g. VB_Share)
Select the Shared Folder path on Windows (e.g. D:VBox_Share)

Step 4: Create a folder in named VB_share in homeuser-name (e.g. homesatishVB_share) and share
mkdir VB_Share
chmod 777 VB_share

Step 5: Run the following command
sudo mount –t vboxsf vBox_Share VB_Share

Vaibhav's user avatar

Vaibhav

6,48210 gold badges47 silver badges72 bronze badges

answered May 9, 2014 at 5:40

Satish's user avatar

Понравилась статья? Поделить с друзьями:
  • Id abonent ошибка сети
  • Icucnv64 dll ошибка
  • Icq произошла ошибка попробуйте позже 430
  • Ict u70 ошибки
  • Ict p70 коды ошибок