---
title: "Disk2Vhd: Learn to convert Physical Machines to Virtual Disks"
description: "Learn to convert running physical machines with Microsoft Sysinternals Disk2VHD in this practical how-to tutorial!"
canonical: "https://adamtheautomator.com/disk2vhd/"
---

# Disk2Vhd: Learn to convert Physical Machines to Virtual Disks

> Learn to convert running physical machines with Microsoft Sysinternals Disk2VHD in this practical how-to tutorial!

Source: https://adamtheautomator.com/disk2vhd/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Disk2Vhd: Learn to convert Physical Machines to Virtual Disks](https://adamtheautomator.com/wp-content/uploads/2022/01/Disk2Vhd-Learn-to-convert-Physical-Machines-to-Virtual-Disks.jpg)

# Disk2Vhd: Learn to convert Physical Machines to Virtual Disks

[![](https://secure.gravatar.com/avatar/b4cd4a109fc359fca6ccc8a192dd75bf9a440677bb2a87da8c23f48d76b3bb39?s=192&d=mm&r=g)Edem Afenyo](https://adamtheautomator.com/author/edem-afenyo/)12 January 20226 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Disk Management](/tag/disk-management/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Installing and Running Disk2vhd](#installing-and-running-disk2vhd)
*   [Converting a Physical Disk to a Virtual Disk](#converting-a-physical-disk-to-a-virtual-disk)
*   [Converting Disks Via The Command-Line](#converting-disks-via-the-command-line)
*   [Creating a Virtual Machine with the Converted Disk](#creating-a-virtual-machine-with-the-converted-disk)
*   [Conclusion](#conclusion)

Do you have some physical Windows devices that you dream about virtualizing and getting rid of the clunk, but you have no idea how to best approach that? Wonder no more, dear reader. In this article, you will learn more about Disk2vhd by [Sysinternals](https://docs.microsoft.com/en-us/sysinternals/): a tried, tested, and free way to convert physical machines or disks to their virtual equivalents.

In this article, you will convert a physical Windows system by creating a virtualized copy of the disk. Eager to go virtual? Dive in!

## Prerequisites

This tutorial will be a hands-on demonstration. To follow along, be sure you have the following:

*   A Physical Windows device. The examples will run on a Windows 10 device.

> _[Disk2vhd has been recorded to work on Windows 11](https://windospc.com/how-to-run-windows-11-on-virtual-machine-virtualbox/). If your physical disk contains a working Windows 11 installation, this tutorial will still serve you well._

*   Enough free disk space to save the disk you are going to convert. Disk2vhd will help you identify exactly how much space is needed. At a minimum, you will need as much space as is in use on the physical disk
    
*   Any Running Hypervisor. Oracle [VirtualBox](https://www.virtualbox.org/) v6.1.22 is used in the examples. Other hypervisors, like [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/), or [KVM](https://www.linux-kvm.org/page/Main_Page), will also serve you fine.
    

A user account with administrative access.

Related:[How to Install Oracle VM VirtualBox on Windows 10](https://appuals.com/oracle-vm-vbox-w10/)

Related:[Getting Started Guide to Managing Hyper-V VMs with PowerShell](https://adamtheautomator.com/hyper-v-powershell/)

## Installing and Running Disk2vhd

Your first step is to install Disk2vhd if you haven’t already. For the tasks to come you will need a user with administrative access and physical access to the Windows device. The disk you want to convert needs to be connected and [online](https://docs.microsoft.com/en-us/windows-server/storage/disk-management/manage-disks).

Head over to [Microsoft’s Sysinternals page](https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd) and download a copy of Disk2vhd. At the time of writing this article, the latest version available, and the one the examples will be based on, was version 2.02. The download will be a zip archive containing various versions of the program.

Right-click on the most appropriate version for your device and select **Run as administrator** as seen below.

![Starting Disk2vhd as administrator ](https://adamtheautomator.com/wp-content/uploads/2022/01/image-111.png)

Starting Disk2vhd as administrator

## Converting a Physical Disk to a Virtual Disk

Now that you have a working and running copy of Disk2vhd, is time to virtualize your Windows 10 boot disk. The selected disk will be the _C:\\_ drive on the machine used as an example.

> _For the sake of brevity, this article will be limited to converting a boot disk (a disk that has a working copy of Windows) to a virtual hard disk. But Disk2vhd is not limited to converting boot disks._

Your first task is to select the right flags for the disk you are about to create:

*   Check the **Prepare for use in Virtual PC** flag if you intend to make the disk compatible with the **deprecated** [Microsoft Virtual PC](https://en.wikipedia.org/wiki/Windows_Virtual_PC).
    
*   Check **Use Vhdx** if you prefer the resulting virtual disk to be of the vhdx format instead of a regular vhd file.
    

> _VHDX is an [improved version](https://www.netwatch.me/2015/03/19/vhd-vs-vhdx-hmm-whats-the-difference/) of the VHD format, but it is limited in vendor support when compared to VHD. VHDX boasts better performance and a much higher maximum disk size when compared to VHD (64TB as opposed to 2TB). Since both formats are ultimately [from Microsoft](https://en.wikipedia.org/wiki/VHD_\(file_format\)), it makes sense to defer to VHDX in cases where Hyper-V will be used as the hypervisor. VHD can be used where cross-compatibility with other hypervisors is important._

*   Check **[Use Volume Shadow Copy](https://docs.microsoft.com/en-us/windows/win32/vss/volume-shadow-copy-service-overview?redirectedfrom=MSDN)** if you are working on a running system and do not want to interfere with the state of the system. This option aims to enable you to have a smoother conversion process. You will not need to be concerned about file-in-use popups or inconsistencies in the system state. If you do not check this option, you will directly copy the files from the live volume, instead of copying files from the shadow copy.

> _Shadow copies are essentially point-in-time read-only snapshots of volumes that can be used for consistent disk copy operations. Programs that rely on the technology can make safe copies of the files even while applications are in use._

If you are following along, your options should look like the screenshot below.

![Selecting the appropriate options ](https://adamtheautomator.com/wp-content/uploads/2022/01/image-112.png)

Selecting the appropriate options

> _You are not selecting the VHDX because VirtualBox cannot fully handle VHDX disks. To avoid over-extending the tutorial by trying to convert from one disk format to the other, the output format is set to VHD._

2\. Now it is time to select the output file. Pick the name of the output VHD file, including its full path and extension. The output file in the example will have the same name as the device name, as you can see below.

![Providing the file name](https://adamtheautomator.com/wp-content/uploads/2022/01/image-113.png)

Providing the file name

3\. You will now select the volumes you want to virtualize. The disk in this tutorial is Master Boot Record (MBR) based, so you select the only volume needed, as shown below. Be sure to reserve at least as much space free on the destination drive as the **Space Required** column specifies.

Related:[MBR vs. GPT: Which Partition Style to Use?](https://adamtheautomator.com/mbr-or-gpt/)

> _For a [GUID Partition Table(GPT)](https://www.diskpart.com/gpt-mbr/gpt-guid-partition-table-disk-1203.html) partitioned disk, you have to copy the [EFI System Partition (ESP)](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions?view=windows-11#system-partition) volume in addition to the Operating System (OS) volume. The ESP volume contains bootloader files that the system needs to locate and boot an OS properly._

![Selecting input volumes, pay attention to the Space Required information ](https://adamtheautomator.com/wp-content/uploads/2022/01/image-114.png)

Selecting input volumes, pay attention to the **Space Required** information

Related:[How to Convert MBR to GPT and GPT to MBR \[Step-by-Step\]](https://adamtheautomator.com/convert-mbr-to-gpt/#Converting_MBR_to_GPT_using_MBR2GPT)

4\. With everything in place, you are ready to start the conversion process! Beware that due to the load Disk2vhd puts on a running system, it is not advisable to run it on systems already known for high loads. Click **Create** to start the conversion and wait until the process is complete.

![Conversion in progress](https://adamtheautomator.com/wp-content/uploads/2022/01/image-115.png)

Conversion in progress

5\. Voila! After waiting for the completion of the process, you should now have a VHD file in the folder you specified, as seen in the screenshot below.

![The resulting output VHD file ](https://adamtheautomator.com/wp-content/uploads/2022/01/image-116.png)

The resulting output VHD file

> _Be sure not to mount the resulting VHD directly on the physical machine. [Windows uses a signature to identify each connected disk.](https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd) To avoid a disk signature collision, Windows will change the signature of the virtual disk when you mount it on the same machine as the physical disk. If you create a new VM with the disk, as is in this tutorial, the new VM may be rendered unbootable._

## Converting Disks Via The Command-Line

For those who need it for automation or remote usage, Disk2vhd has also a command-line option. The syntax follows:

```bash
disk2vhd [-c][-h] <volumes-to-include> <output-vhdfile>
```

*   The **\-h** flag is the same as selecting “**Prepare for use in Virtual PC**” on the graphical user interface(GUI).
*   The **\-c** flag will make a direct copy and not a shadow copy
*   Volumes are included by specifying their drive letters or using for all.

The example below creates a backup copy of the _C:\\_ drive C on a 64bit machine via a PowerShell session. The output filename will incorporate the backup creation date in the file name with the [Get-Date](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.2) PowerShell cmdlet. Give the file a specific name, to run this code in a non-PowerShell session.

```powershell
disk2vhd -c c: "\\file-server\Backups\snapshot-$(Get-Date -f yyyy-MM-dd).vhd"
```

The command will create a file akin to the one in the screenshot below upon successful conversion.

![VHD file created via Disk2vhd command-line](https://adamtheautomator.com/wp-content/uploads/2022/01/image-117.png)

VHD file created via Disk2vhd command-line

You can couple the command line with a scheduling solution, such as a scheduled task in PowerShell to create a barebones automated backup system.

Related:[How to Use Scheduled Tasks to Automate File Transfers](https://adamtheautomator.com/automated-file-transfer/)

### Creating a Virtual Machine with the Converted Disk

Now that you have a virtual replica of the physical, you will attach the resulting virtual hard disk to check your action results. After booting up the virtual system, you will find it virtually replicates your previous system (pun intended).

1\. Open VirtualBox to follow along and then select **New** under the **Machine** menu

![Create a new VM in VirtualBox Manager](https://adamtheautomator.com/wp-content/uploads/2022/01/image-118.png)

Create a new VM in VirtualBox Manager

2\. Give the machine a name, select a folder to store the files, select the **OS Type** and **Version** accordingly, and click **Next.**

![VM creation window: Identification details](https://adamtheautomator.com/wp-content/uploads/2022/01/image-119.png)

VM creation window: Identification details

3\. Select the memory the system will consume. For your testing purposes, 2 GB of RAM should be enough.

![VM Creation Window: RAM settings](https://adamtheautomator.com/wp-content/uploads/2022/01/image-120.png)

VM Creation Window: RAM settings

4\. Now comes the most crucial part, the **Hard disk** selection. Select “**Use an existing virtual hard disk file**” and click the browse icon provided to find the VHD created earlier.

![VM Creation Window: Hard Disk creation](https://adamtheautomator.com/wp-content/uploads/2022/01/image-121.png)

VM Creation Window: Hard Disk creation

5\. The next screen lists know Virtual Box VHDs. Choose **Add** to include the new VHD in the list of disks known by VirtualBox. This step is necessary before attaching the disk to any VM.

![VM Creation Window: Hard disk Selection](https://adamtheautomator.com/wp-content/uploads/2022/01/image-122.png)

VM Creation Window: Hard disk Selection

Navigate to the VHD file created in the previous section and select **Open**.

![Selecting the converted hard disk file](https://adamtheautomator.com/wp-content/uploads/2022/01/image-123.png)

Selecting the converted hard disk file

7\. VirtualBox lists the VHD as **Not Attached**. Select the file and click **Choose** to attach the VHD to the new VM.

![VM Creation Window: Hard disk selection](https://adamtheautomator.com/wp-content/uploads/2022/01/image-124.png)

VM Creation Window: Hard disk selection

8\. Click **Create** .

![VM Creation Window: Create VM](https://adamtheautomator.com/wp-content/uploads/2022/01/image-125.png)

VM Creation Window: Create VM

9\. You can now start the VM. Select **Normal Start** as seen below.

![Starting the VM: Turning on the VM](https://adamtheautomator.com/wp-content/uploads/2022/01/image-126.png)

Starting the VM: Turning on the VM

10\. You should see the same sign-in screen as the physical device.

![Starting the VM: Sign-in Screen](https://adamtheautomator.com/wp-content/uploads/2022/01/image-127.png)

Starting the VM: Sign-in Screen

11\. After logging in, you will notice that the virtual machine is an exact copy of the physical device, down to the user accounts and installed applications. The virtual machine is the same as the physical one.

## Conclusion

Disk2vhd can save you a lot of time whenever you need to virtualize a physical disk, whether it is a live OS or not. By coming this far, you are now ready to virtualize your physical devices and reap the benefits of virtualization.

What are the machines that you are planning to virtualize?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdisk2vhd%2F&text=Disk2Vhd%3A%20Learn%20to%20convert%20Physical%20Machines%20to%20Virtual%20Disks)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdisk2vhd%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdisk2vhd%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2021/05/How-to-Partition-and-Erase-Windows-Volumes-with-Diskpartx.jpg)

### [Mastering Diskpart : Erase and Partition Volumes with Ease](/diskpart/)

Learn how to create partitions, create volumes, delete volumes and partitions and manage unallocated space with the Windows Diskpart utility.

![](https://adamtheautomator.com/wp-content/uploads/2023/01/ubuntu-disk-space.jpg)

### [A Comprehensive Guide to Ubuntu Disk Space Management](/ubuntu-disk-space/)

A step-by-step guide to managing Ubuntu disk space, including tips for organizing files, checking disk space usage, and troubleshooting disk issues.

![](https://adamtheautomator.com/wp-content/uploads/2021/11/How-To-Manage-Storage-With-Linux-GParted.jpg)

### [How To Manage Storage With GParted Linux](/gparted-linux/)

If you're looking for a user-friendly yet versatile partition editor, look no further. In Learn hands-on how to manage storage partitions using the GParted Linux tool.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
