Required: Virtualbox Guest Additions. See this post: http://diegobenna.blogspot.com/2011/01/how-to-install-virtualbox-guest.html
Prepare host
Click on Devices and then Shared Folders in Virtualbox:
Click on the add button in the Shared Folder dialog:
Click on the down arrow in the Folder Path field, select Other and navigate to the folder you create:
Make a note of the Folder Name since you'll be needing it in a minute. Check off Make Permanent to ensure the shared folder stays shared after you shutdown or reboot your virtual machine:
Prepare guest
If the client is Linux, you have to mount and connect it to a folder.
The following bash commands (in the client) would setup a correct mount (and creates a link from your desktop) Note: you should not use spaces in the share name.
sudo mkdir /mnt/sharename
sudo chmod 777 /mnt/sharename
sudo mount -t vboxsf -o uid=1000,gid=1000 Example-Shared-Folder /mnt/sharename
ln -s /mnt/sharename $HOME/Desktop/sharename
Note: if you want to mount the folder as owned and writable only by root, omit the -o uid=1000,gid=1000 option to the mount command.
For the above command if you get error as
mount: unknown filesystem type 'vboxsf'
Then just change the vboxsf to vboxfs
If error persist install virtualbox guest utils:
sudo apt-get install virtualbox-ose-guest-utils
end reboot the virtual machine.
To ensure the shared folder is mounted whenever your virtual machine is booted, run the following command: sudo nano /etc/rc.local
and enter the command you entered in the last step (without the sudo in front) into this file below the hashes (i.e., #'s) but above “exit 0” (note that the arrow keys move the cursor and ctrl+x is used to exit which will prompt you to save first, answer Y, then hit Enter)sudo mount -t vboxsf -o uid=1000,gid=1000 Example-Shared-Folder /mnt/sharename
Exit the terminal by typing: exit or by pressing ctrl+d.
0 comments:
Post a Comment