By Crystal / Last Updated April 2, 2022

What is Disk2vhd

Disk2vhd is a free utility that creates virtual hard disk (VHD) of physical disks for Microsoft Virtual PC and Hyper-V virtual machine. It allows you to run Disk2vhd on the physical computers when the system is on online. Disk2vhd works to use Window’s Volume Snapshot feature to produce consistent point-in-time snapshots of the volumes of physical machine.

what is disk2vhd

How to use Disk2vhd for Hyper-V P2V conversion

If you want to convert your physical machines to Hyper-V virtual machines, Disk2vhd is necessary for you to perform P2V migration. The following procedures are based on Windows 10 device to run Disk2vhd. Before starting using it, make sure you have enough disk space to store the disk you want to convert.

Step 1. Download Disk2vhd on physical server

Download Disk2vhd from Microsoft website. After you have downloaded it, extract the zip file and select Run as administrator to run disk2vhd.exe.

download disk2vhd

Step 2. Convert disk to VHDX format

Now you can start converting the Windows 10 physical disk to VHD format.

• In the open Disk2vhd wizard, you can check the options on the right side.

Prepare for use in virtual PC: It allows to make the disk compatible with the deprecated Microsoft Virtual PC.

Use Vhdx: It generates a VHDX file instead of VHX file. Compared to VHD, VHDX is more convenient with better performance and larger maximum disk size (64TB, instead of 2TB). However, VHD can also be used in cases where cross-compatibility with other hypervisors is required.

Use Volume Shadow Copy: VSS service is crucial to keep data consistency. Using VSS is to create point-in-time snapshots of volume to ensure secure copy while using applications. If you leave this option unchecked, you will copy files directly from the live volume, not from the shadow copy.

                                                                                                      

convert disk

• Select a destination for the VHDX file. It is more recommended to choose a different disk from the one where you made the image or network path, otherwise it may cause an “inception”.

• Select the volumes you want to convert.

• Click Create to start the process which may take a while according to your disk size.

Step 3. Create a new VM with VHDX file

When the exporting is completed, you can go to Hyper-V manager to create a virtual machine with the VHDX file.

• Click Hyper-V host >> New >> Virtual Machine.

• In Connect Virtual Hard Disk wizard, select Use an existing virtual hard disk and click Browse to find the .VHDX file.

connect virtual hard disk

Use Disk2vhd command line to convert P2V

If you want to automate Disk2vhd or operate it remotely, you can write script to create VHDs. It can 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:]...]|[*]>

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

Disk2vhd facilitates the process of converting Hyper-V physical to virtual which offers valuable benefits. But if you need to manage a large number of virtual servers, Disk2vhd may not meet your needs. You can use System Center Virtual Machine Manager (SCVMM) to perform P2V or V2V in Hyper-V.

Use backup and recovery to achieve Hyper-V P2V

Besides Disk2VHD, you can use a centralized backup software for data migration such as AOMEI Centralized Backupper. It works by installing an agent on both physical and virtual machines, so it allows to restore backups to virtual machine through the central console. Not only the entire disk, you also can backup and restore files, operating systems, partitions and volumes accurately.

For centralized backup, it has the following benefits:

  • Saves time and reduces the centralized management cost.
  • Automates centralized backups with one click.
  • Offers flexible backup management.
  • Reduces the risk of human error...

Steps to create centralized backup task for Hyper-V P2V:

1. Click Task >> New Task >> Disk Backup.

2. Type a new name. Then select computers >> select data based on backup rules >> select destination for storage such as the path of a network share or NAS.

backup disk

3. Customize the backup by Setting, Schedule or Scheme.

After creating the backup task, you can restore it to virtual machine conveniently.

Summary

This article introduces how to use Disk2vhd to convert physical to virtual machine in Hyper-V. It achieves efficient data migration and optimizes utilization of resource. After creating a new virtual machine, do not forget to backup your virtual machines for secure data protection.

If you are in VMware environment, there was a tool named VMware Converter to achieve VMware P2V or V2V migration.