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?
Best Answer
In order to use shared folder functionality few prerequisites need to be met:
vboxsf
to be able to access shares.Depending on host or guest OS the following may also be needed:
/home/username
orMy Documents
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: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.