How-To Geek

How To Turn a Physical Computer Into A Virtual Machine with Disk2vhd

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.



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.

Download Disk2vhd

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+

  • Published 12/28/09

Comments (18)

  1. Chit

    How about the reverse? Can a virtual machine be converted back to a physical machine? What would the steps be to do that?

  2. Justme

    Anyone that knows the name of this cool theme? :D

  3. Jonathan

    I tried using this to convert a physical Vista image into a virtual image, but I ran into issues with the source hard drive being larger than the 120GB limit for Virtual PC. Even though I reduced the total file size down to under 90GB, the virtual image ‘remembers’ that the hard drive was 300GB and wasn’t able to mount the virtual image. I tried a few different tools to reset the volume size, but was never able to get the image to “look” smaller than 140GB. If anyone has any ideas about how to get around this, it would be very helpful.

  4. keith

    This is great, but in addition to the size limit, it cannot do just a single partition on a disk. For that I had to use VMware’s free Converter Standalone Client

  5. Baseball Mike

    I’ve used Disk2VHD for a while, and its great. Even if you never load the disk as a virtual machine, being able to attach the VHD as a local disk and getting at all of the files is very handy.

    But — does anyone know how to do the reverse? Turn a virtual disk into an actual disk (or machine)? I know its not an often used/desired feature — but I ran a trial of an OS, and now I want to migrate it to a physical machine.

    Any ideas?

  6. Will

    @Justme The name of the theme is called Windows “Embedded” Style/Standard. It’s an official Microsoft theme and it’s digitally signed by Microsoft. Hence, there is no need for a uxtheme patcher.

  7. Justme

    Will: Thanks ;)
    Going to use this on my XP.

  8. Paul

    Baseball Mike

    You could try ghosting the image. Run Ghost or other similar (and free!) tool on the virtual image and then ghost it back to a hard drive – it’s worked for me!

  9. Cedric

    Sorr but this doe not work for windows 7,when I try and specify an existing vhd I created from my physical machine it throws and error.

    What is the point of the tool ,then ?

  10. tjX

    I wonder what the theme is on the IBM Thinkpad…

  11. MQ

    If you are on Vista or Win7, you can take a virtual image and reverse it simply by using the Windows complete system backup and then using the Windows recovery to restore the image to a physical hard drive. Mileage varies since you then face hardware compatibility issues.

  12. JAA

    Thanks geek my second computer running xp sp3 convert into virtual machines

  13. RxKiller
  14. Michael

    I got this error when running Disk2vhd even though I reduce the disk c: size to 40GB. It reads “error snapshotting volume: catastrophic failure” Any advice?

  15. texascowgirl

    Hi. I’m a newbie & have not done a VM at all. In planning to do this, I found this page and readers’ comments very useful.

    Questions: Jonathan says he repartitioned his hard drive to size the partition to be smaller than the max and that didn’t work. Anyone have any suggestions since I expect to need to do that with my machines if I am going to use Disk2vhd.

    How about using a Win98 machine with Disk2vhd? Yup. It’s a great machine; gotta admit we quit taking it on the net years ago. It does business, some games, etc.

    Thanks to all!

  16. Wade

    Any way to do this with Win 7 Home edition?

  17. Chris

    Hi All,

    Have you noticed that when you create a vm image using Disk2vhd and try to use Windows 2008 R2 HyperV to view/import the .vhd created with disk2vhd, somehow Windows 2008 R2 HyperV doesn’t recognized the .vhd image.


  18. Noy

    @Chris – To deploy the .vhd created with disk2vhd in Windows 2008 R2 Hyper-V, just select New>Virtual machine and go through the inital settings. When you get to the “Connect Virtual Hard Disk” option, select “Use an existing virtual hard disk” and browse to the location of your .vhd file. This worked great for me with .vhd created from a physical Windows Server 2003 R2x86 box.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!