How to share files with VirtualBox between Mac and Windows

Posted in Mac, Tutorials, Windows, apple, leopard, macbook, tips on May 16, 2008

I recently felt the need of changing my VMWare Fusion 2.0 Beta, because it kept on locking my Mac. I found VirtualBox, which is recently acquired by Sun, offered for free and has a recent release 1.6. I read some nice reviews, and although it lacks some features, looks like it’s quite fast and reliable (will review it when I get to use it more).

First thing I needed to do with VirtualBox, after setting up a Windows was to share files between my Mac (Leopard) and Windows (XP). VirtualBox does not offer drag and drop for now, but hopefully will do soon. To share files between 2 computers:

1. Install Guest Additions

Go to “Devices->Install Guest Additions”. After selecting this, open “My Computer”, and you will see there is Guest Additions installer mounted. Just double click and install. After installing, do not forget to reboot (that’s important).

2. Create a shared folder

Go to “Devices->Shared Folders”. Press “Add” (+ sign on right side). Browse for your shared folder on your mac. Pick up a good name and note it down (we will use the name later on). I suppose you selected a folder to share and named it “shared”.

3. Create a batch file

On Windows XP, shared folders are browsable. Easiest way to mount shared folders is to create a batch file, instead of writing a command each time you login. To do that, right click on Desktop, select “New->Text file”. Rename your text file to “Mount.bat” (or something else you wish). After renaming, right click on it and select “Edit” and paste the code below (with necessary modification, depending on your shared folder name. I assume it’s “shared” in our case)

net use x: \\vboxsvr\shared

Beware of the space in between “x:” and “\\” otherwise you will get;

System error 67 has occured

Which in my opinion a common mistake. Save the file and you are done. Just double click on “Mount.bat” on your desktop and you will see X: drive will appear with your shared folder on My Computer.

Enjoy :)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Slashdot
  • Technorati
  • email
  • Facebook
  • Furl
  • Google Bookmarks
  • LinkedIn
  • Mixx
  • Netvouz
  • NewsVine
  • Pownce
  • Reddit
  • StumbleUpon
  • TwitThis

Trackback URI | Comments RSS

25 Responses to “ How to share files with VirtualBox between Mac and Windows ”

  1. # 1 Allan Says:

    I’m trying to install additions in VirtualBox 1.6.2. Your blog – and many others state, “Go to “Devices->Install Guest Additions””

    Sounds simple, but – maybe I’m stupid. I just don’t see a “Devices” menu option anywhere. What the heck is going on?!

  2. # 2 Ugur Says:

    It shows up after you start the VM :)

  3. # 3 amin Says:

    your directions are unclear with regard to filepath. I did this and I dont see my mac shared folder on windows at all???wtf?

    also you totally didnt even mention to make sure “hide file extensions” is unchecked in windows.

  4. # 4 Alexander Rubino Says:

    Hey, nice of you to give some tips about sharing files. But amin was right to say that information is missing. I wasn’t able to share my folders yet. I guess that is because the filepaths are unclear. So I ask Where do i have to create the folder i want to share?

    Thanks

  5. # 5 Alexander Rubino Says:

    Hi,

    Two things.

    First to amin: i made it work already. I put the folder i wanted to share in my home folder. You were right about the hide file extensions. You have to uncheck that box in the folder options. I also created the .bat file in the windows Desktop. From that it should work fine.

    To Allan: to install the guest additions you have to be running windows virtual machine. While it’s running go to mac menu for VirtualBox. There go to Devices and then to install guest aditions. By now you haven’t installed the guest aditions yet. What you just did it’s to create an image in the guest SO, in this case Windows. In windows open My computer and you will see a cd/dvd drive mounted. Click on it and you will start a wizard to install the guest adition

    That’s it, that’s all

  6. # 6 david Says:

    How do you do this with a Vista host and an Ubuntu guest? I don’t want to have to mount the shared folder everytime I boot Ubuntu.

  7. # 7 Ugur Says:

    Hey guys, thanks for pointing these out. I personally didn’t have any problem when I set it up; but maybe in some cases these cause problem. I hope it works fine for all at the moment.

  8. # 8 Tim Says:

    Thanks for the post! It’s helpful. I kept trying \\vboxsvr\shared in explorer’s address bar but explorer couldn’t find the shared folder. It’s kinda weird that net use from the command line works.

    cheers!

  9. # 9 pyramind Says:

    For those who can’t get it working: You almost always need to install guest additions TWICE to get this working. (I did an uninstall, reboot and reinstall and voila! it worked)

    See this topic:
    http://forums.virtualbox.org/viewtopic.php?t=8181

  10. # 10 Yap Says:

    Works like a dream!
    For me I had to reboot twice to get it working.

  11. # 11 Michele Says:

    i can’t go with your tips…
    help me please..
    i have searched in google for 3 hours: how to open mac files in windows using virtual box
    but the results is zero..
    all the tips there can’t be applied in my laptop..

    my laptop is mac os x tiger..:(

    thx before..

  12. # 12 Andreas Says:

    Thanks a million for this short and simple explanation of how to create shared folders on mac host with xp guest. Have been struggling a lot with this…

  13. # 13 harland Says:

    Wonderful post!!
    I’ve been looking for something like this for ages. I never had any difficulties following your simplest instructions.

    Thanks a lot.

  14. # 14 Chris Says:

    Thanks so much! Only really confusing thing for me was that ’shared’ is the name of the folder on the host machine, not the name you give to the shared folder through VB. Once I realized this it worked like a charm! Thank again!

  15. # 15 maissam Says:

    tanx alot
    it was so help full

  16. # 16 Patty Says:

    Just a note: As I was trying this, I didn’t understand you have to be using the Virtual Machine AND clicked ON the computer window of the virtual box before the menu will appear at the top of the screen with DEVICES listed… Took me a few minutes, so I thought I’d let others know in case they’re having as hard a time as I have been!

    Thanks, though. I’ve been trying to figure this out for weeks!

  17. # 17 Patty Says:

    I still don’t get it… guess I’m slow. I did everything I read and I still don’t see my shared folder in my shared folders!

  18. # 18 Patty Says:

    I never got past the guest addition and creating the shared folder. After that I looked around and found this:

    http://www.giannistsakiris.com/index.php/2007/09/28/virtualbox-access-shared-folders-from-windows-xp-guest-os/

    which helped me find my shared folder.

    Thanks again.

  19. # 19 Guille Says:

    Thank you Patty!! and thanks to everybody as well!!!

  20. # 20 Ismail Says:

    hi everyone.

    regarding with reinstalling Guest Additions (GA), I find that after uninstalling the GA, Windows prompts me with the installation of Base System Driver whenever I try to reinstall the GA, which I don’t know what or where. Do I have to insert my Leopard installation disk to install the driver?

    pls reply. thank you and have a good day ppl.

  21. # 21 fux Says:

    Too late on this.

    But many many thanks.

  22. # 22 Dustin Says:

    Thank you!

  23. # 23 Rami Hailat Says:

    Thank you man, it was on the target :) but for you all you have to install the VB services twice to get everything work.

  24. # 24 gazmen Says:

    You just made my day m8 !

  25. # 25 Himanshu Says:

    Worked like a charm for me. Thanks for the clear instructions.

Speak your peace!