3

I've installed Ubuntu 10.04 as a Virtualbox VM. I'd like to make my entire C drive an always-enabled shared folder under ~ (/home/). I've seen this tutorial but I'm unsure of the differences between the commands they give. After creating a new virtual folder called "C" under Virtualbox Settings -> Shared folders, I tried, inside ~,

mkdir C
sudo mount -t vboxsf share ~/C

but I get

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

What is the correct command to achieve what I want to do?

5

According to this blog post, the first argument after vboxsf (share in this case) should be the label you've given the folder in the Virtualbox Manager. Since I called my folder "C" in the Virtualbox Manager, I was able to mount the folder with:

mkdir C
sudo mount -t vboxsf C ~/C

However, this method requires the drive to be remounted after start-up. This excellent post suggests putting the command in the /etc/rc.local script, which is run on start-up:

sudo mount -t vboxsf -o uid=1000,gid=1000 virtualbox_share_name /home/my_username/folder_name

The full path is required since it's running as root.

1
  • Worked for me using Ubuntu Server 14.04 on VirtualBox 5.0.20. – mrgloom May 13 '16 at 9:15
1

In the past when I ran into a protocol error while mounting a VirtualBox share, I just went into the shared folders configuration in the VirtualBox UI, removed the share configuration that wasn't mounting properly and re-created it with exactly the same settings, then retried the mount and it worked.

0
  1. Setup the share from the virtualbox interface in the Host OS. (I would not give myself write permission to C:. or for a short period and then remove it)
  2. Install VirtualBox Additions in the guest OS.
  3. Make your user (in the Guest OS) a member of the vboxsf group that has provileges setup correctly.

    sudo usermod -a -G vboxsf bob (if your user is bob)

Depending on your settings as of 1) you'll get read/access from the "Computer" section showing drives, normally you should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.