Virtually Painless - Using Disk2VHD to reduce time to solution
Published Mar 16 2019 03:19 AM 298 Views
First published on TECHNET on Jan 04, 2010

Hello all, happy New Year and welcome back from the holidays.

I recently worked a case involving intermittent COM+ corruption, and resetting security permissions would alleviate the issue for a period of several weeks. As I am sure you can imagine, this makes troubleshooting root cause very difficult. In cases like this where a relatively easy workaround is available, there is often pressure from above to implement the workaround and release the system back into production without root cause being determined.

For issues such as this, the Disk2VHD tool from Sysinternals may come in handy.  Simply create a virtual image of your physical server using Disk2VHD, then load the VHD under Microsoft Virtual PC or a Windows 2008 Hyper-V server.  With undo disks or snapshots enabled, you can reproduce the issue as many times as needed until root cause is determined.  At the same time, your production server can remain active while you troubleshoot it’s twin in a virtual environment.

A useful feature of the tool is that the target machine need not be offline when you are creating a VHD; in fact you may run this tool on the problem system itself, and though not recommended you may also write the VHD to a local disk that you are backing up. The tool is very simple to use and creates separate VHDs for different drives. All you need to do is select the drives you would like to be converted. I am including a snapshot below.

The VHDs are created in Microsoft’s Virtual Machine disk format and can be used in Microsoft Virtual PC or Microsoft Hyper-V virtual machines.

We also have the option to enable creation of VHD’s via scripts. The following command line may be used for this. Specify the volumes you want included in a snapshot by drive letter (e.g. c:) or use "*" to include all volumes.

Usage: disk2vhd <[drive: [drive:]...]|[*]> <vhdfile>

Example: disk2vhd * c:\vhd\snapshot.vhd

Here are some recommendations and known issues that you may run into while using Disk2Vhd:

1. It is not recommended to attach a VHD to the same system from which it has been created. If you do so, the operating system assigns a new disk signature to this disk to avoid collision and Windows will fail to locate the boot disk.

2. On Microsoft Virtual PC, be aware that virtual disks sized greater than 127GB are not recognized regardless of the amount of data.

3. Virtual PC also does not support multiple processors.

4. There was a known issue with the initial version of Disk2VHD that sometimes caused Windows XP and Windows Server 2003 to not boot. To mitigate this, be sure to use the latest version.

So, thanks for your time and I hope you find this information helpful.

Paras Pant

Share this post :

Version history
Last update:
‎Mar 16 2019 03:19 AM
Updated by: