Pages

How to share files in virtualBox | Ubuntu Host and Ubuntu Guest

I was running a virtual machine Ubuntu12.04 in the host operating system Ubuntu12.04. In the virtual machine my development environment was already set and I want to set the same environment in the actual host operating system. The problem was that, I could not share some installation files from Guest operating system to the Host.

For this I did the following things.

  • Create a folder named "share" in the home directory.
  • Right click "Properties->share"
  • Install whatever software it prompts to install(samba server)
  • Then start the virtual machine instance
  • select Devices->Shared folders
  • Click the Add button
  • choose the share folder created above.
  • Optionally select the make permanent option
  • Create a folder /mnt/hostshared and give 777 permissions
Type the following command in a terminal
sudo mount -t vboxsf share /mnt/hostshare

if there is any problem try
sudo mount -t vboxfs share /mnt/hostshare

or if you know a little bit of linux, try solving the problem based on your knowledge from the error logs.

Best case scenario, the shared folder of the Host operating system should be mounted in the folder /mnt/hostshare in the guest operating system.

Reference
https://help.ubuntu.com/community/VirtualBox/SharedFolders

Enjoy!!

No comments:

Post a Comment

If you like to say anything (good/bad), Please do not hesitate...