create a Windows Virtual PC in Ubuntu with USB support

Do you want to use Ubuntu as your main operating system but still have access to Microsoft Windows? Instead of installing Microsoft Windows on a separate disk partition, virtual PC software enables you to install one or more operating systems in a virtual box (or sandbox) on top of your regular operating system. This is known as Virtualization technology.

This seems to be a good option for those who need to run a specific application that is only available on Windows (instead of using wine) while being happy to use Linux for most other tasks. Additionally, its easy to take a snap-shot backup of a virtual PC.

I recently tried this myself… I had previous experience of using Microsoft Virtual PC at work. I recall hearing that vmware made part of its poduct offering open source. I tried looking into vmware first but gave up (it offers the viewer for free but the bit stuff that enables you to create a virtual PC is not).

I then came across VirtualBox. I installed the open source edition. I’m currently using Ubuntu 8.10 (Intrepid) which installed VirtualBox 2.0.4 open source edition. The VirtualBox graphical interface is reall nice. I soon found myself gliding through the setup wizard creating a virtual disk for Windows XP which I then used to install Windows XP from scratch (you can attach/mount a Windows XP CD, or an equivalent iso file).

I used the dynamically expanding disk size option, allocating 10gig. I have 1gig RAM so I allocated 500meg RAM to the virtual PC.

Once installed I found that you are not able to surf the web until you disable the Windows firewall (I’m not fully aware of the implications of doing so).

Next, I found that you have to press the ‘Right Alt’ key to release the mouse when moving from the virtual PC back to the host operating system (in my case Ubuntu). To resolve this I followed instructions to install VirtualBox ‘guest additions’ within the virtual PC I had created. Unfortunately the download gave an error message but I found that I was able to click on the download URL which opened in my web browser on my host operating system which enabled me to successfully download the ‘guest additions’ iso. I mounted the iso to make it available to the virtual pc which installed them. Now the mouse moves between my host operating system and the virtual PC effortlessly.

I then noticed that the virtual PC would not show my USB stick. I tried following a few instructions in pages which I googled but soon gave up.. these days all Ubuntu apps seems to be self installing so if you find yourself following some convoluted command line instructions from a blog it might be a wrong turn or for a previous version of the product… I then noticed that VirtualBox offered a second verion of its application under the ‘VirtualBox Personal Use and Evaluation License (PUEL)’. The open source edition has a few features disabled (including USB support out-of-the-box, so to speak). USB support is enabled in the PUEL version (which companies can pay for but it is free for just home use).

So I downloaded a VirtualBox (version 2.0.6) binary for Linux. I found that I had to uninstall VirtualBox open source edition before I could install the PUEL version.

Once installed I had to restart Ubuntu before the PUEL verion of VirtualBox appeared in the Ubuntu menu (under Applications; System Tools; Sun xVM VirtualBox). Normally when installing applications in Ubuntu a restart isn’t required.

When I started VirtualBox I found that the virtual PC I had created was still available which I was able to start successfully. I could access the contents of my USB stick from inside the virtual PC, and the ‘guest additions’ were installed so the mouse integration feature was working.

Note that when you enable/attach a USB stick in the context of a virtual PC, it is then not available to your host operating system.

Also, if you need to access a printer from within the virtual PC, the device must work with your host operating system for it to work with the virtual PC.

virtualbox

virtualbox

virtualbox running Windows XP on Unbuntu

virtualbox running Windows XP on Unbuntu

Advertisements

0 Responses to “create a Windows Virtual PC in Ubuntu with USB support”



  1. Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s





%d bloggers like this: