The World Simplified is a Virtual World

The Adventures of Justin Zarb and Dave Falkus in the Virtual Jungle

Disk2vhd Released!

Disk2vhd Released!

  • Comments 5
  • Likes

attach_vhd Now this is a cool tool that gave me some massive loving recently. I was in a situation that i needed to repro a customer issue and wanted to take it away with me for further testing, obviously i could not take there PC ……. or could i :o)

Mark Russinovich and Bryce Cogswell have created a ubba tool called Disk2vhd. Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft’s Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). The difference between Disk2vhd and other physical-to-virtual tools is that you can run Disk2vhd on a system that’s online. Disk2vhd uses Windows’ Volume Snapshot capability, introduced in Windows XP, to create consistent point-in-time snapshots of the volumes you want to include in a conversion. You can even have Disk2vhd create the VHDs on local volumes, even ones being converted (though performance is better when the VHD is on a disk different than ones being converted).

The Disk2vhd user interface lists the volumes present on the system.

It will create one VHD for each disk on which selected volumes reside. It preserves the partitioning information of the disk, but only copies the data contents for volumes on the disk that are selected. This enables you to capture just system volumes and exclude data volumes, for example.

Note: Virtual PC supports a maximum virtual disk size of 127GB. If you create a VHD from a larger disk it will not be accessible from a Virtual PC VM.

To use VHDs produced by Disk2vhd, create a VM with the desired characteristics and add the VHDs to the VM’s configuration as IDE disks. On first boot, a VM booting a captured copy of Windows will detect the VM’s hardware and automatically install drivers, if present in the image. If the required drivers are not present, install them via the Virtual PC or Hyper-V integration components. You can also attach to VHDs using the Windows 7 or Windows Server 2008 R2 Disk Management or Diskpart utilities.

Note: do not attach to VHDs on the same system on which you created them if you plan on booting from them. If you do so, Windows will assign the VHD a new disk signature to avoid a collision with the signature of the VHD’s source disk. Windows references disks in the boot configuration database (BCD) by disk signature, so when that happens Windows booted in a VM will fail to locate the boot disk.

Disk2vhd runs Windows XP SP2, Windows Server 2003 SP1, and higher, including x64 systems.

Download Disk2vhd
(704 KB)

Run Disk2vhd now from Live.Sysinternals.com

Runs on:

  • Client: Windows XP SP2 and higher.
  • Server: Windows Server 2003 and higher
Comments
  • Thanks a lot.I appreciate your articles,good work.

  • Created a VHD of a Windows XP Pro installation just fine, but I can't run it on any other system as a virtual machine. It mounts and opens fine using disk management.

    The first error is a "disk read error" when first booting. I fixed that with testdisk (http://www.cgsecurity.org/wiki/TestDisk) and then just got a black screen after POST.

    Next step was to try a repair or reinstall of Windows XP from CD. It installs all the way to "2 minutes remaining" and then turns off the machine.

    I believe the scenario is valid (I am trying to retire a piece of hardware and just want to retain the OS & applications). And I also know it's not easy, or I would have done it years ago! By the description, it looks like disk2vhd should work for this scenario, but not for me.

    If anyone has some luck, please post here or email wlrock at hotmail dot com.

  • Hey rock, I just used it to create a vhd of a Windows XP Pro installation as well. I tried to open it with Virtual PC 2007 on Windows 7 Home Premium and I too received a black screen after POST. However, I never received any "disk read error' messages. If anyone could help me figure out what to do to get past the black screen, on Virtual PC, it would be awesome!

    Thanks,

    Jerad

  • I got the same "unable to write to hard disk drive error" after creating a vhd on x86 winxpsp3 and creating a new VM in Win7 Ent x64 Virtual PC RTM. I checked the vhd file permissions, but even assigning everyone full control didn't help. As a workaround I enabled undo disk, then the VM agreed to start up. But this is only temp workaround, the changes are written to the undo disk and not the real vhd.

  • Hi

    I have had too many problems with disk2vhd. Instead I used virtualbox with vm_converter. Very good results. Here is the instruction page for that :

    www.pjsquared.com/blog

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment