Sharing files between Ubuntu and a Windows VirtualBox

I’m currently running Ubuntu (11.04) with Windows in a VirtualBox, both at work and at home.

Every once in a while I have a need to share a file in one direction, or the other. So here are my notes on how to do it, for future reference!

Mounting a Windows share from Ubuntu is pretty easy:

  1. Share the folder, if you haven’t already
  2. Open your Home Folder, and go to File -> Connect To Server…
  3. Select “Service Type”: Windows Share
  4. Enter the server name, and logon credentials
  5. Job’s a good ‘un

Going the other way is a little more involved, and I think you need the Guest Additions installed:

  1. In the vbox instance menu, select Devices -> Shared folders
  2. Either right click and “Add Shared Folder”, or press Ins
  3. Select “Other” from the folder path drop down, and choose the host folder you want to access (tick “Make Permanent” if you’re going to need it in future)
  4. Back in Windows land, open Explorer and go to Tools -> Map Network Drive
  5. Your share will be called \\vboxsvr\<SHARE_NAME> (you should be able to browse to it if you’re not sure what it’s called)
  6. Done