I want to have a directory which is accessible on both Windows 7 installed on Ubuntu host, and the Ubuntu as well.
So I have installed the Virtualbox additions on both Windows and Ubuntu.
Then in Ubuntu:
sudo mkdir /media/win7share
sudo mount -t vboxsf win7share /media/win7share
I get:
/sbin/mount.vboxsf: mounting failed with the error: No such device
- What do I need to type in Shared folders in Virtualbox Manager settings?
- What do I need to set up on Windows?
Host: Ubuntu
Choose the folder that is to be shared (the same way as below - open VM settings on Your host and choose). Lets say it is (folder on Your host which You want to see from Win7 guest):
This tutorial covers the answer. After adding Your Ubuntu folder to shared start or reboot Your Win7 VM You should search Your local area network (in Win7 guest; wait until it has searched it - the green progress bar). After that network disk should appear.
On my PC it was found with no further steps. In case of problems please refer to the tutorial.
Host: Win7, Guest OS: Ubuntu
First go to Your virtual machines settings:
Add the folder You wish to share and name it (it will automatically name it). Here the Win7 path to my folder is C:\Misery and the name is Misery
Then mark Auto mount option to mount it always when starting Your VM.
And basically that's it. Now start Your virtual machine. This tutorial explains the rest, in short You need to create the folder that will be Your mounting point (on the guest). Let's say it will be GMisery on Your ubuntu. So Create it in Your user directory. So now we have existing empty folder on guest OS:
Next open Your terminal and write:
Now it should work. At least id does on my PC :] If no error occured, logout and login again and it should be done.
Please read attached tutorial also.
And in general it is a good idea to install on your host VB extension pack. However it has no influence on the topic discussed here.
The solution is to:
Add user to
vboxusers
group (orvboxsf
, depending on the version):Create the dir for the shared docs:
(the mistake was to try to put this in
/media
and trying mounting it - this is not necessary as the newest VirtualBox does it for us)Go to the VirtualBox options and add that
shared
directory to the shared paths.In my case the button was grayed probably due the permissions, now solved in 3.
Make sure that
vboxsf
kernel module is running by:modprobe vboxsf
(inside VM).And that's all. The specified dir will appear in the Windows as a new drive.
Create a directory on Windows, say ubuntu.
In the device of VMware share this directory (ubuntu).
Create a directory on Ubuntu in root (/) say /windows.
The answer to your question is here
You must add the mount line in the
/etc/profile
file to make the mount permanent whenever you log in.