Monday, November 4, 2013

How to - Share file/folder from VirtualBox guest to VM


After I started using Ubuntu VM in VirtualBox, I needed to share an entire folder from VirtualBox host to guest. Let me provide the steps I used to share a folder.

  • In the host, I created the folder I wanted to share to the guest.
  • I powered off the host VM.
  • In VirtualBox Manager, I selected my host VM & then clicked on "Settings" in the top menu.
  • Then, it opened up the following screen:
  • Then, I clicked on "Shared Folders" to see the following screen. In this screen, I clicked "+" symbol highlighted as below:
  • Then, a popup opened:
  •  I provided the folder I wanted to share to the guest & selected "Auto-mount":

  • Then, clicked "OK"s to finish.
  • Then, started the VM.
  • Then, opened file explorer & browsed this path: Devices --> Computer --> media. Here I saw the folder I shared in my guest, but the name of the folder was prefixed with "sf_":

  • Then, when I clicked on the folder, I got an error:

  • The cause of this error was that the user "babu" didn't have access permissions because user "babu" wasn't part of the group the folder has permissions. To fix this, I ran the following commands. Basically, I added user "babu" to the group:

  • Then, I rebooted. Browsed the same path: Devices --> Computer --> media --> sf_Linux_Code. This time, I could see the files inside the directory:


 Hope this helps.

No comments:

UA-48797665-1