From desktops to servers, find the right IT Support for your business.

How to Virtualize a PC

Iain Laskey shows how to turn a physical PC into a virtual one

I have a fairly elderly Windows XP PC that is starting to suffer from an intermittant hardware fault. As I've long since lost some of the installation CDs and floppy disks (yes, it's that old), the prospect of rebulding it onto a new machine didn't appeal too much. Instead, I decided to virtualise it.

What is Virtualisation?

Virtualization is very popular in the corporate world as a way to maximise resources. Essentially, you use a single piece of physical hardware to run a number of virtual computers. You could have a Linux web server, a Windows 2003 office fileserver and a set of test systems all running on the same physical box. Clever software manages all this and makes each 'PC' think it's the only one running on its own dedicated hardware. You can read more about virtual machines here.

Despite these roots, virtualization is becoming more and more popular amongst power users at home as a way to create throw away environments for testing, web browsing or creating a multi machine environment using a minimum of physical PCs.

Creating a Virtual Machine

There are a number of products that let you create and work with virtual machines. For the purpose of this excercise I'll be looking at using VMWare's tools as they offer free software that provide all a home user could want.

There's two basic approaches to use when creating a virtual PC. You can either install an operating system and applications onto a 'blank' virtual machine or you can clone an existing physical one. In this instance, I'm going with the second option.

To do this, first, download VMWare's free vCentre Converter. I have a fairly powerful Vista PC on which I intended storing/running my virtualised PC on so I installed the software on that..

The failing PC has two hard drives, an 80Gb one with the OS and apps on and a second 500Gb one with the data. I decided to just virtualise the OS & Apps drive.

Conversion Wizard

There are a few options to choose when you start the convertor tool and usefully, one is to clone a PC across the network so I chose that. There are a few other options to select in the Conversion Wizard such as how much RAM to allocate to the virtual PC, before you can set it off. A few hours later, it had finished and a quick check on the Vista machine revealed a 30Gb file had been created containing everything that made my old XP machine what it was.

I switched off the XP machine for the last time, removed the 500Gb data drive and installed it into the Vista PC for later use.

Running your Virtual Computer

Having created a virtual version of my old PC, I now needed a way to run it on my Vista one. This time I downloaded VMWare Player and again installed it on the Vista PC.

XP running under VistaI then ran VMWare Player, used it to load the virtualized PC image and in a few seconds, my XP machine appeared in a window on my Vista screen.

Within the XP PC I then mapped the 500Gb hard drive's two partitions from the host Vista PC, just as you would any other shared drive across a network, leaving me with virtual C: and D: drives with E: and F: being the mapped ones.

Further Tweaking

At this point I had my XP machine up and running nicely. However, a few things still needed to be done to finish the job properly. The virtualisation process meant that from XP's point of view, it was running on different hardware. XP had worked out drivers for almost everything itself but a couple of exclaimation marks in the device manager showed some problems. A quick Google found the appropriate drivers which once installed cleared the problems.

Windows XP then wanted to revalidate itself to check it wasn't a pirate copy and happily passed with flying colours. XP will do this check anyway if it detects a major hardware change.

Selecting Hardware ConnectionsWho has the Hardware?

One thing that needs addressing is what happens if you plug in new hardware such as an iPod into the host PC. Does it appear in the host PC or the virtual one(s)? VMWare's Player makes this very easy to manage. Any new hardware can be swapped back and forth between the real and virtual PC and it remembers how things were set thereafter. For instance, I have iTunes on the XP machine and now when I plug my iPod into the Vista PC, it appears in the XP PC (assuming it's currently running) and happily synchronises itself from there.

The printer is also attached to the Vista PC and I had the choice of either swapping it over to the XP one or leaving it where it is and setting it up as a networked printer. I chose the second option allowing me to print from either the physical or virtual PC seamlessly.

Go Faster Stripes

One of the many things that seperates the free VMWare offerings from the rather more expensive corporate ones is VMWare Tools. This gives you improved video speed and better mouse handling along with other features such as the ability to cut and paste between the virtual and host PC.

Installing is a bit tricky though and essentially involves downloading the demo of VMWare Workstation, unzipping it to a folder and looking for the Windows VMWare Tools ISO file. Once found, you can mount this on your virtualised PC using any standard Windows ISO mounting tools (I used Virtual Clone Drive) and install from there. There is a useful guide to this task here. Whilst aimed at Linux users, the process is similar.

Other Choices

Having installed VMWare Player on your host PC, as well as running your virtualised PC, you can also run any number of other virtualised machines. Most Linux releases are available in this format so for instance a Google on VMWare Ubuntu should find you a file you can download and run. This gives you an easy way to run Linux alongside your Windows system without having to get messy with boot menus and the like.

VMWare also offer a huge number of VMWare Appliances for free download. These cover a range of tasks with database servers, web servers, firewalls, Linux/BSD variations and more.

Performance

I've left this until last but you'd probably think such shenanigans can only result in a slow machine - much like emulation. The original XP machine had an Athlon XP 1800, the Vista box sports an Athlon X2 4600. I can't say that I can see any difference in performance running the Virtual XP box compared to the old real one. I have 1Gb of RAM allocated to the virtual XP PC and some things are if anything slightly faster, some a little slower. On balance though it's quite usable and I watch DVDs, convert videos, process audio and other non-trivial tasks without any obvious slow down. I can iconise the XP PC whilst it's working and continue to use the Vista machine without any real lag in performance.

Another bonus is that the virtual PC can be set to save its current state rather than switch off when you close VMWare Player, similar to Windows hibernation. As such, it's now very quick to fire up when I need it, only requiring a full boot every now and then, much as a real PC.

And Another Thing

Another useful trick with virtualizing your PC is that you can just as easily copy the handful of files to a different PC and run it there if you want. For instance, I wanted to show a friend something on the virtual PC so I just copied it over to my laptop and took it to his house - somewhat easier than lugging a tower case over. You can also make a copy of your PC and if something wrecks it - a virus, a rogue program or just incompetence, you can just delete it and copy back your backed up version.

Success?

The VMWare converted PC has been running for a couple of months now and I've never had to fire up the original hardware version since converting it. Everything I did on the old one still works as it did on the virtual PC. I can now pull the old one apart, add it to the spares pile and consign the case to our local Freecycle group thus freeing up some much needed space on the floor. A win.

Iain Laskey

Keep up to Date with PPC

RSS feed icon

Add to Google
Free Sitemap Generator