Page 1 of 1

Unable to Share

Posted: 12. May 2015, 21:48
by Farmer John
Hi,
I am running VirtualBox V4.3.26 on a Windows 7 64-bit host. I have successfully installed Debian V8.0.0 32-bit as the guest with guest additions of the same version. I have been trying to setup a share on the host machine that is visible in the guest. This is what I have.

Host directory: d:\VirtualBox\Shared\General
Guest directory: /home/work/shared/general

I have used VirtualBox|Settings|Shared Folders to share the host directory which I have set as Make Permanent. The directory /home/work/shared/general exists on the guest. I log into the guest and type the following command. sudo mount -t vboxsf general /home/work/shared/general

This works as expected and I am able to see the share in Debian. When I use the mount command on its own i get the following entry for this share.

none on /home/work/shared/general type vboxsf (rw,nodev,relatime)

Is this correct (i.e. the "none on" part) even though the share works?

I would like to make this mount at boot up so I modify /etc/fstab as recommended by adding the following line.
general /home/work/shared/general vboxsf defaults 0 0

On reboot Debian fails to startup correctly and switches to Safe Mode. I use the command journalctl -xb to view the startup log and see an entry "Failed to mount /home/work/shared/general". The line I added was then removed from fstab. After a bit of googling I added the following line to /etc/rc.local.

mount -t vboxsf general /home/work/shared/general

This time Debian booted up and I was able to login but was unable to see any of the shared files.

I have been running Debian V7.8.0 and used the fstab modification which worked fine on that version. After lots of googling I still have not been able to successfully setup this share and any help would be appreciated.

Also when I try to unmount the share using the following command.
sudo umount /home/work/shared/general

I get the error "umount nfs: /home/work/shared/general is not an NFS filesystem". What is the correct way to unmount this vboxsf share?

Re: Unable to Share

Posted: 12. May 2015, 22:00
by loukingjr
FWIW, I use Automount for shared folders. It works for 99.9% of all guests including Debian. The shared folder mounts in /media. There is no need to add mount commands in fstab.

be sure to add the username to the vboxsf group.

Re: Unable to Share

Posted: 13. May 2015, 11:26
by Farmer John
Hi, I would like to try this but I am not sure how to add the username to the vboxsf group. What is the command? After I have done this how can I verify that it has been added successfully?

Farmer John

Re: Unable to Share

Posted: 13. May 2015, 11:28
by loukingjr
run…

Code: Select all

sudo adduser username vboxsf
restart the guest.

Re: Unable to Share

Posted: 16. Jan 2016, 09:54
by reylon
I have the same problem. Mount with fstab works perfect in debian 7 and not in debian 8. I don't like automount from vbox because I will like establish specific owners in the vb shared folder. Someone has resolved fstab mount with vbox sharing in debian 8????