Creative Commons License

This work is licenced under a Creative Commons Licence.

User login

Copy / Share files between Ubuntu host and Windows XP VirtualBox

I've recently been playing around with VirtualBox, and have loved it. I've found that all the operating systems that I've installed in it have been very snappy, and it has been simple to use them. I did however, after setting up a Windows XP box, want to copy files from the XP virtual machine to my Ubuntu host. This was, unfortunately, not quite as simple as one would hope, but it isn't hard.

All that is required is to set up a folder on the host, and mount this as a network folder on the virtual system - bilateral file transfer between the host and virtual system is then possible.

Step 1: Make the shared folder

mkdir ~/VirtualBoxShare

Step 2: With the virtual machine off, add a share by typing on the host machine:

vboxmanage sharedfolder add "Windows XP" -name "share" -hostpath ~/VirtualBoxShare/

This assumes that the virtual machine is called 'Windows XP' in Virtual Box. Note that it is essential to type a fully qualified path for the shared directory.

Step 3: Boot up the virtual Windows XP machine, and open a command prompt (start>run>"command") and enter:

net use x: \\vboxsvr\share

This will mount the folder as the "X Drive".

That is all! Simple to do, and easy to use.

A little correction

Hey, thanks for the tutorial, I tried to follow it to accomplish that same thing but it didn't work in the first try. There is a previous step you have to do before doing all that: install VBoxGuestAdditions into the guest machine (dowloading VBoxGuestAdditions_{version}.iso, mounting it and installing it), without it you just can't share network folders... hope it helps, bye.


Having already installed these for other purposes (I like having a decent resolution screen) I hadn't realised they were required. Thanks for being kind enough to point this out to anyone else who might read this!