Last week, you couldn't hardly find an IT-related blog that didn't announce this new free Sysinternals tool. Disk2vhd copies the contents of a physical disk to a virtual disk in Microsoft's VHD format. Since Disk2vhd uses Windows’ Volume Snapshot capability, you can use the tool while the physical machine is online. In theory, it is possible to convert a physical system drive to a VHD.
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
The size of the standalone tool is only 670KB, so you shouldn't expect wonders. I tried Disk2vhd on a Windows 7 system. I encountered my first problem with it when I had to decide which partition to convert. My boot and my system partition are separated. I selected them both and Disk2vhd packed them in one VHD file without complaining. The result was that neither Virtual PC 2007 SP1 nor the successor Windows Virtual PC was able to recognize the VHD. I didn't try it with Hyper-V, but, I guess, the result would have been the same. Perhaps, it would have worked If I ran the tool twice to create two separate VHD files. But I didn't explore this path because I have a 64-bit system and Virtual PC doesn't support 64-bit guests.
I then tried something different for which the tool was not really made for. I used it within a VMware Workstation virtual machine. Disk2vhd was indeed able to create a VHD from the VMDK disk. I could even write the VHD file to a shared drive on the host system. This probably means that the utility also supports network shares as destinations. Not every P2V tool has this feature. Unfortunately, I wasn't able to boot with this VHD in Virtual PC 2007 SP1 and Windows Virtual PC. The virtual machine always hung. I then tried to boot in Safe Mode. Virtual PC was loading the drivers, but then the virtual machine hanged again. Syspreping the source VM didn't help either, however, my guts tell me that this could work with a little more fiddling.
I admit my test Disk2vhd was not really fair. I suppose the tool works fine in common environments. Please share your experiences if you tried the tool already.