VirtualBox, problem mounting shared folder

Joshua Stoutenburg jehoshua02 at gmail.com
Tue Dec 13 20:14:34 UTC 2011


On Thu, Dec 8, 2011 at 8:40 AM, Colin Law <clanlaw at googlemail.com> wrote:
>
> I hope someone can help with mounting shared folders in VirtualBox
> (4.1.2).  I am using this for the first time, running a Precise
> virtual machine in Ubuntu 11.10 host.  I have installed the Guest
> Additions which seem to be working ok except that I cannot get shared
> folders to work.
> In the guest os I added the user to group vboxsf.
> In Devices > Shared Folders I added a share with path /home/colinl
> (which is on the host) named it host_colinl, checked Auto mount and
> Make Permanent.
> I re-booted the guest.
> I see that it has correctly created the folder /media/sf_host_colinl
> but it shows as empty (even with sudo) and in nautilus it does not
> show the mounted icon on the folder.
> I removed the share from Devices > Shared Folders and added a new one
> with a different path and share name downloads.  This time I did not
> select auto mount.
> In a terminal in the guest I created /media/host_downloads then
> sudo mount -t vboxsf downloads /media/host_downloads
> and it says
> /sbin/mount.vboxsf: mounting failed with the error: No such device.
>
> dmesg shows nothing at that point, nor does syslog.
>
> Google has not helped me.  Any suggestions gratefully received.
>
> Colin
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


I also had some frustrations getting shared folders to work. There
were a few things I had to do, which weren't in the documentation.

Make sure permissions _on the host system_ for the folder you are
trying to share are correct. Somehow, the user under which VirtualBox
runs must have rights to this share _on the host system_.

The _share name_ in VirtualBox *must not* be identical to the actual
_folder name_ on the host. I simply prefixed the share name with `sf_`
to solve that one. Also, when setting up the share in VirtualBox, the
only option I chose was "make permanent". I *did not* choose
"automount".

Guest Additions must be properly installed within the guest. I know
the process was a little involved without a GUI on Ubuntu Server
(something about linux headers, dpkg, load ISO, mount cd drive,
navigate to cd, and run the appropriate installer for linux).

The share must be properly mounted in the guest. I placed an entry in
`/etc/fstab` to mount the share with options for setting the owner,
group and permissions.

I'm not sure how much of this advice is excess, outdated, or
irrelevant. Just throwing it out there in case it may do some good.
Overall, setting up shared folders was easier said than done.




More information about the ubuntu-users mailing list