Opening a window to the virtual world

One final trick (for now) in our exploration of VirtualBox is to enable a means to
exchange files between our Ubuntu host and the virtual Windows XP machine.

Now, this may seem like a bad idea given that a major benefit of using a virtual
machine is that it is isolated from the real system and, once shut down, it effectively
disappears from the planet. However, we will need to install those misbehaving
Windows’ applications and it may not be convenient to do so by first loading them
onto a CD – which is currently our only access to the virtual machine for loading
operating systems – and software packages!

It may seem reasonable that such file exchange should be accomplished using the
now ubiquitous USBkey; however, from information gleaned from the web, support
for USB devices in VirtualBox seems to fraught with difficulties. Another option is
to set up a shared folder on the Ubuntu host that can be accessed by the VM. This
process is also not all that intuitive, but a little web-based assistance proves to be
very worthwhile.

In particular, there is an excellent how-to Youtube video ( on the subject from David Steinlage of that gives precise instructions.  In effect, you need to create a folder in the Ubuntu file system, point to this folder as a shared folder in the VM, and map it as a network drive with an appropriate drive letter for use by Windows.

With the VM running, the main trick is to use the Devices – Shared Folders menu item in the VM’s window, and then find the tiny icon – a folder with a plus sign – in the right side bar that is the “Add shared folder” option. Using the drop-down menu for the folder
path, select “Other…” and browse for the shared Ubuntu folder. Next, be sure to check “Make Permanent” so that the shared folder will be available each time you run the VM. Checking the “Read-only” box is optional, depending on whether or not you wish the VM to be able to write (i.e. store) files to the shared folder.

Once the shared folder has been defined, the final step is to go into the virtual machine itself, select Start – My Computer – Tools – Map Network Drive, assign a drive letter (the default is drive z:), and browse for the shared folder. This will be found under something like Virtual Box Shared Folders – \\Vboxsvr\vboxshared.

If the Ubuntu folder doesn’t show up in the mapping list you will have to take one additional step (that isn’t noted in the Youtube tutorial). In the VM’s window, navigate to Devices – Install Guest Additions. Subsequent prompts will ask if you wish to download, register and mount the associated CD image. Finally, an installation wizard will load Sun’s VirtualBox Guest Additions and ask you to reboot the VM. Once this process has been completed, repeat the process to map a network drive and, this time, the shared folder will appear in the list of folders that can be mapped to a Windows’ drive letter.

Now if you wish to install a Windows’ application in the VM, all you need to do download the installation file, store it in the shared folder on the Ubuntu machine, run the virtual machine, use Windows Explorer to open the mapped drive z:, and double-click on the file to start the installation process.

[And, yes, once I installed my bridge tutorial this way, little red hearts and diamonds were displayed on-screen so I now know what bids are being made!]


Exploring Linux – Part 17

This entry was posted in Virtual machine. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s