Page 2 of 5

Re: Sharing drives or folders

Posted: 26. Jan 2011, 08:04
by deathtical
Still having issues...
Image

Am starting to remember why I stopped using linux at home. I already work on and fix computers all day at work. Just want something simple at home. Not giving up yet though. Thanks.

Re: Sharing drives or folders

Posted: 26. Jan 2011, 09:56
by fixedwheel
what is the exact name you give to the share in the guests VBox settings?

Re: Sharing drives or folders

Posted: 26. Jan 2011, 13:05
by pennywhistle
Hi,

I'm having the same trouble and would like to follow Perryg's instructions, which look really clear, but I don't know how to find out what my uid and gid are or how to get my user name in the vboxsf group. Sorry if this seems really dumb


Penny

Re: Sharing drives or folders

Posted: 26. Jan 2011, 13:21
by fixedwheel
Hi,
pennywhistle wrote:find out what my uid and gid are or how to get my user name in the vboxsf group.
information is in the /etc/passwd and /etc/group files - and the first user usually gets uid 1000 gid 1000 but may be uid 500 gid 500 in some distributions

to connect user "foobar" to vboxsf group do as root:
usermod -G vboxsf foobar

Re: Sharing drives or folders

Posted: 27. Jan 2011, 01:14
by Sasquatch
deathtical wrote:Still having issues...
Image

Am starting to remember why I stopped using linux at home. I already work on and fix computers all day at work. Just want something simple at home. Not giving up yet though. Thanks.
Then change the name of the shared folder defined in the VM settings, use lower case only just to be sure. So let's change F_DRIVE to fdrive. The command will be as follows:

Code: Select all

sudo mount -t vboxsf -o rw,uid=1000,gid=1000 fdrive /mnt/F_DRIVE
For the other users, please check my howto as well. It has a few pointers in finding your ID for example. If there is anything unclear, please say so, so I can change it.

Re: Sharing drives or folders

Posted: 1. Feb 2011, 03:39
by anfho
Dear Perryg,

thanks very much for your great help. Sharing folders with the manual mount function worked.

It did not work however with the automount function... where can I set the "automount-option" in the "Device" menue? I could not see it... is that available? Please see the file attached.

Another question:
Is it possible to move the folder that I am sharing "C:\User\Andreas\Documents" (from Win 7 host) from the file directory "mnt" on the guest (LINUX Ubuntu 10.10) system to the "Home" folder (home\andreas\Documents)?

Thanks very much. Best regards, Andreas

Re: Sharing drives or folders

Posted: 1. Feb 2011, 03:44
by Perryg
Auto-mount was introduced in VirtualBox 4.0.0. If you are still using 3.2.12 then you will not have it.

Re: Sharing drives or folders

Posted: 1. Feb 2011, 03:49
by anfho
wow. thanks for the quick response. I was editing my post while you responded. could you please check the question I have asked above? Thanks -Andreas

Re: Sharing drives or folders

Posted: 1. Feb 2011, 04:15
by Perryg

Code: Select all

sudo mount -t vboxsf -o rw,uid=1000,gid=1000 <share name> /home/andreas/Documents
use your uid and gid if different.
Notice that the / instead of the \ is used in Linux. Linux is also case sensitive so be careful.

If you want this to be a permanent mount when you get it to the way you like it, put the mount statement in your /etc/rc.local file and it will mount it every time you reboot.

Re: Sharing drives or folders

Posted: 11. Mar 2011, 01:25
by anfho
Dear Perryg,
thanks for your help above, but I have noticed that if I restart my guest, each time I have to manually mount the folders that I would like to share with the host... Is there a way to have them automatically mounted each time I start the guest?

Also: I recently updated to VBox 4.0.4, which allows the auto-mount function. I have checket "Auto-mount" and "Make Permanent" In the settings for the Device --> Shared Folders --> Double click on shared folders--> Edit Share Tab.

However, still no success, when rebooting the guest: I have to mount it again.

I have looked in /media/sf_documents, which would be the mount-point for the auto-mount function as you mentionend in your previous message and "documents" is my shared folder.

You also mentioned that my "username must be in the vboxsf group (in the Linux guest)" if I would want to use auto-mount....

I did not now what that meant...
I appreciate your help on that.

Best regards, Andreas

Re: Sharing drives or folders

Posted: 11. Mar 2011, 01:47
by Perryg
See Chapter 4.3.2 Automatic mounting in your VirtualBox users manual.
Basically if you want the new feature to work (in the Linux guest) you open the user manager and go to groups and add your user name.
A guest reboot is mandatory.

Re: Sharing drives or folders

Posted: 11. Mar 2011, 11:14
by Cyberian
or you follow chapter 4.3.1 Manual mounting

Re: Sharing drives or folders

Posted: 16. Mar 2011, 00:47
by anfho
Hi,
I was able to get the auto-mount to work but only temporarily. I added my username unter groups/vboxsf and then it worked.

HOWEVER:
Since I wanted to change the MountDir, I installed the guest properties Manager (Sec. 4.6 in the Manual, sarting from p.66)

Since the guest properties manager was not preinstalled, I had to install it (UBUNTU):

Code: Select all

sudo apt-get install virtualbox-ose
,
such that the commands VBoxManage and VBoxControl would work. However, some of the installation faild and now I am not even able to mount manually anymore:

Code: Select all

$ sudo mount -t vboxsf -o rw,uid=1000,gid=1000 Documents /mnt/documents
/sbin/mount.vboxsf: mounting failed with the error: No such device
Please help. Thx.

Re: Sharing drives or folders

Posted: 16. Mar 2011, 01:09
by Perryg
Undo what you did. You can not run the VirtualBox OSE program inside of the guest. It messes up the release version from VirtualBox.
VBoxManage and VBoxControl are run from the host and since you are using Windows you must be in the directory that has these files or add the directory that has them to the Windows environment variable.

Re: Sharing drives or folders

Posted: 16. Mar 2011, 02:36
by anfho
Undo by reinstall VBox4 ?