How to share files with VirtualBox between Mac and Windows
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 :)
June 14th, 2008 at 2:05
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?!
June 15th, 2008 at 11:49
It shows up after you start the VM :)
July 26th, 2008 at 7:57
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.
July 26th, 2008 at 21:10
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
July 26th, 2008 at 21:35
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
July 27th, 2008 at 12:15
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.
July 28th, 2008 at 11:43
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.
August 1st, 2008 at 12:21
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!
August 2nd, 2008 at 1:19
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