29 de junio de 2011

How to share files with VirtualBox between Mac and Windows

Today I needed to setup a Windows XP virtual machine with Virtual Box at work. Doing that, I happened to need files from my computer to be accessible from the virtual machine with Windows XP.


How did I get that done? Well, I used the guide of this excellent post(which I borrow here :P ): link.


Here it goes:

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 :)

No hay comentarios: