Friday, December 3, 2010

How to share a folder from host to guest in VirtualBox

This is documented quite well in the VirtualBox documentation. But I’ve made my own notes here since it’s a task I do often enough, but sometimes still forget.


  1. With the guest machine turned off, open the Settings dialog.
  2. Go to the Shared Folders tab.
  3. Click on the Add Shared Folders button.
  4. Browse for the directory you want to share, and give it a name. In my case, I called the share work and I selected c:\work on my host’s filesystem. Click OK.
  5. Restart your guest machine.
  6. Now you need to mount this shared folder in the guest OS.


In Windows, the share is always named \\vboxsrv\sharename. You can navigate to this via My Network Places. You could also use the net command:

net use q: \\vboxsrv\sharename

In Linux, you use the mount command:

mount -t vboxsf sharename mountpoint

e.g.,

mount -t vboxsf work /mnt/work

No comments: