Pages

Monday, June 28, 2010

Setting up a shared folder in virtual box, windows host , ubuntu guest

You might be wondering if there is any way of getting your data from the virtual disk into your real machine or vice-versa, tension not, it is very easy. All you need to do is set up a shared folder. In order to do this follow the following easy steps.
  1. Go to virtual machine settings and select the shared folders tab.
  2. Now add the path of the folder you want to share and give a name to it, this will be used in your Ubuntu VM machine. Note: if you add the Desktop folder with its default name, i.e. "Desktop" you will not be able to set up sharing, this is some bug, so i recommend changing the folder name to "shared" or something else.
  3. Also check make permanent if you wish to use the folder again after reboot :)
  4. Now make a folder in which to map the shared folder e.g "mkdir ~/Desktop/share"
  5. now use the following command "sudo mount -t vboxsf share ~/Desktop/home" where share is the name of the shared folder you gave in virtual machine settings and ~/Desktop/share is the path where you wish to map the shared folder.
  6. Or you may edit the /etc/fstab file and put the following line in the end of it"share /home/username/Desktop vboxsf auto 0 0" notice here the ~ wont work, so you need to give the full path, and the last two arguments are zero not alphabet 'o'.
  7. Now open the folder and enjoy.

Notes:
  1. The Ubuntu folder that you are mapping to must be empty
  2. If you are already in the shared folder, it wont show any files, you need to cd back into the folder to be able to see the files.

No comments:

Post a Comment