Do you wish there was a hassle free way to migrate physical machines to VMs for testing and consolidation? Today we take a look at Disk2VHD from Sysinternals which is a simple solution for turning physical Windows machines into VM’s–even while they’re up and running.

Running Disk2VHD

Disk2vhd allows you to create a Virtual Hard Drive (VHD) of a physical machine even while the machine is up and running using volume snapshot technology. This small utility doesn’t require installation and you can run it from a flash drive if you want. Just open up the Disk2vhd folder and run the executable.

Agree to the EULA…

Now select the physical drive you want to turn into a VHD, give it a name and location to create and store it. You’ll need to select a location that is large enough to store the VHD you’re creating. In this example we’re creating a VHD from an IBM ThinkPad running XP. Notice the space required under the Volumes to include section shows 6.48GB and the E:\ drive is actually an 8GB travel drive. Also, If you’re creating a VHD from XP or Server 2003 and will be running it on Microsoft Virtual PC, check the box Fix up HAL for Virtual PC. After everything looks correct, click on the Create button.

You’re shown the progress bar while the VHD is created. The XP VHD from an older IBM ThinkPad G40 used for this test took about an hour to complete. The amount of time it takes to create the VHD will vary from system to system.

Setup on Windows Virtual PC

Here we’ll take a look at running the newly created VHD on Virtual PC in Windows 7. We need to create a new machine first, so open Windows Virtual PC from the Start Menu.

In the Virtual Machine folder click on Create virtual machine to launch the wizard.

Name the machine something that helps you identify it, where in this case we gave it the name of the physical machine it came from.

Decide the amount of memory to give to the virtual machine and select network settings.

In the next step of the wizard we need to point to the location of the VHD and click Create.

The created virtual machine will be placed in the Virtual Machines folder.

There are a few things to point out on this XP virtual machine. Because we moved it from another computer, we need to reactivate the XP license.

The new hardware wizard will come up as XP starts pointing out different hardware detected on the virtual machine. We found that cancelling out of those wizards worked the best.

Then we ran Enable Integration Features form the Tools menu on Virtual PC.

A wizard will start on the virtual computer and just follow each step until it’s done, then restart the VM.

After the machine launches from the reboot you can start using it. This example is cool because I’m fond of the ThinkPad for nostalgia sake, and can bring it along with me to other machines.

Conclusion

You can also run the VHDs on Microsoft Hyper-V virtual machines on Server 2008, and we successfully ran one on VirtualBox as well. There are a lot of scenarios where Disk2vhd would come in very handy, especially for consolidating older machines into one. It can be used to create images of other machines for testing, without having to worry about damaging them. Also it could be used for simply creating a backup of your computer. It’s completely free, doesn’t require installation, and will create the VHD while the computer is up and running. It will run on Windows XP SP2 and higher.

Brian Burgess worked in IT for 10 years before pursuing his passion for writing. He's been a tech blogger and journalist for the past seven years, and can be found on his about me page or Google+

Did You Know

The music video for Soul Asylum’s 1993 hit “Runaway Train” focused on the plight of missing children and was dispersed with photos of actual missing kids; as a result of the video 26 missing children were reunited with their families.