The ability to convert a physical machine into a virtual disk and then run the operating system on top of it opens up new possibilities. This tutorial will walk you through how to create an image, convert it back into its original state, and import/export disks in Windows Server 2016 Hyper-V for VMware vSphere 5.
The “convert physical machine to virtual vmware” is a software that allows users to convert their physical machines into virtual disks. The process is very simple and can be done in just a few minutes.
Do you have any physical Windows devices that you’d want to virtualize to eliminate the clunk, but you’re not sure how to go about it? No longer be perplexed, my reader. In this article, you’ll learn more about Sysinternals’ Disk2vhd, a tried-and-true method for converting physical computers or disks to virtual counterparts.
You will convert a physical Windows system by making a virtualized clone of the disk in this tutorial. Do you want to go virtual? Dive in!
This will be an interactive presentation. Make sure you have the following items to follow along:
- A real-world Windows gadget. On a Windows 10 device, the examples will execute.
Disk2vhd has been verified to function with Windows 11. This instruction will still be useful if your physical drive holds a functional Windows 11 installation.
- You’ll need enough free storage space to preserve the disk you’re converting. Disk2vhd can assist you in determining the precise amount of space required. You’ll need at least as much space on the actual drive as is currently in use.
- Any Hypervisor in Use. In the samples, Oracle VirtualBox v6.1.22 is utilized. Other hypervisors, such as Hyper-V and KVM, will suffice.
An account having administrative privileges.
How to Install Oracle VM VirtualBox on Windows 10 is a related topic.
Related: PowerShell Getting Started Guide for Managing Hyper-V VMs
Disk2vhd Installation and Use
If you haven’t previously done so, start by installing Disk2vhd. You’ll need a user with administrator privileges and physical access to the Windows device to complete the actions ahead. The disk you want to convert must be online and connected.
Disk2vhd is available for download from Microsoft’s Sysinternals website. The most recent version available at the time of authoring this article, and the one on which the examples will be based, was version 2.02. A zip bundle containing several versions of the software will be downloaded.
As seen below, right-click on the most relevant version for your device and choose Run as administrator.
As administrator, start Disk2vhd
Creating a Virtual Disk from a Physical Disk
It’s time to virtualize your Windows 10 boot drive now that you have a functioning and operating copy of Disk2vhd. On the system used as an example, the chosen disk will be the C: drive.
This tutorial will be confined to converting a boot drive (a disk with a functional copy of Windows) to a virtual hard disk for the purpose of brevity. However, Disk2vhd isn’t only for converting boot drives.
The first step is to choose the appropriate flags for the disk you’re going to make:
- If you want to make the disk compatible with the deprecated Microsoft Virtual PC, check the Prepare for use in Virtual PC box.
- Check If you’d want the generated virtual disk be in the vhdx format rather than a conventional vhd file, use Vhdx.
VHDX is a better version of the VHD format, however it has fewer vendor support options than VHD. When compared to VHD, VHDX offers greater speed and a significantly larger maximum disk space (64TB as opposed to 2TB). Given that both formats are created by Microsoft, it makes logical to utilize VHDX when Hyper-V is used as the hypervisor. Where cross-compatibility with other hypervisors is essential, VHD may be utilized.
- If you’re working on a running system and don’t want to mess with the settings, choose Use Volume Shadow Copy. This option seeks to make the conversion process go more smoothly. There will be no file-in-use popups or discrepancies in the system state to worry about. If you don’t tick this box, instead of copying files from the shadow copy, you’ll copy them straight from the live drive.
Shadow copies are read-only snapshots of volumes taken at a certain moment in time that may be utilized for consistent disk copy operations. Even when the apps are in use, programs that depend on technology may create safe copies of the data.
Your selections should appear like the screenshot below if you’re following along.
Choosing the best alternatives
Because VirtualBox cannot completely manage VHDX drives, you are not choosing it. The output format is set to VHD to prevent overextending the lesson by attempting to convert from one disk format to another.
2. Now you must choose the output file. Select the output VHD file’s name, including the whole path and extension. As you can see in the example, the output file has the same name as the device name.
supplying the filename
3. Now you must choose the volumes you wish to virtualize. Because this instruction uses a Master Boot Record (MBR)-based disk, you only need to pick one volume, as seen below. Make sure the destination drive has at least as much free space as the Space Required column states.
MBR vs. GPT: Which Partition Style Should You Use?
You must replicate the EFI System Partition (ESP) volume in addition to the Operating System (OS) volume for a GUID Partition Table(GPT) partitioned drive. The ESP volume includes bootloader files that the system need in order to correctly identify and boot an operating system.
When choosing input volumes, keep the Space Required information in mind.
Related: [Step-by-Step] How to Convert MBR to GPT and GPT to MBR
4. Now that you have everything in place, you can begin the conversion process! Due to the significant burden that Disk2vhd places on a running system, it is not recommended to run it on systems that are already known to have high loads. To begin the conversion, click Create and wait for it to finish.
Conversion is now underway.
5. Voila! You should now have a VHD file in the folder you chose after waiting for the procedure to finish, as seen in the picture below.
The output VHD file that results
Make sure the generated VHD is not mounted on the real computer. Each attached disk is identified by a signature in Windows. When you mount a virtual disk on the same computer as a physical disk, Windows will modify the signature of the virtual disk to prevent a disk signature conflict. If you use the disk to build a new VM, as shown in this tutorial, the new VM may become unbootable.
Using the Command-Line to Convert Disks
Disk2vhd also offers a command-line option for people who require it for automated or remote use. This is the syntax:
disk2vhd [-c][-h] <volumes-to-include> <output-vhdfile>
- The -h parameter is equivalent to the graphical user interface option “Prepare for usage in Virtual PC” (GUI).
- The -c option causes a direct copy rather than a shadow copy.
- By providing their drive letters or using for all, volumes are included.
The example below uses a PowerShell session to build a backup copy of the C: drive C on a 64bit computer. When using the Get-Date PowerShell cmdlet, the output filename will include the backup creation date. To execute this code in a non-PowerShell session, give the file a unique name.
“file-serverBackupssnapshot-$(Get-Date -f yyyy-MM-dd).vhd” disk2vhd -c c: “file-serverBackupssnapshot-$(Get-Date -f yy
On successful conversion, the command will produce a file similar to the one shown below.
Disk2vhd command-line creates a VHD file
To establish a barebones automatic backup system, combine the command line with a scheduling solution, such as a scheduled job in PowerShell.
How to Automate File Transfers Using Scheduled Tasks
Using the Converted Disk to Create a Virtual Machine
You’ll connect the generated virtual hard drive to examine your action outcomes now that you have a virtual clone of the actual. When you start the virtual system, you’ll see that it almost exactly duplicates your old system (pun intended).
To get started, open VirtualBox and pick New from the Machine menu.
In VirtualBox Manager, create a new virtual machine.
2. Give the machine a name, choose a location for the files, and choose the appropriate OS Type and Version.
Identification information in the VM creation window
3. Determine how much RAM the system will need. 2 GB of RAM should provide for your testing needs.
RAM settings in the VM Creation Window
4. The hard disk selection is the most important step. Select “Use an existing virtual hard drive file” and go to the VHD you generated previously using the explore icon.
Hard Disk Creation in the VM Creation Window
5. The next screen displays a list of known Virtual Box VHDs. Select Add to add the new VHD to VirtualBox’s list of available drives. This step is required before connecting the disk to any virtual machine.
Hard drive selection in the VM Creation Window
Select Open and go to the VHD file produced in the previous stage.
Selecting the hard disk file that has been converted
7. The VHD is shown as Not Attached in VirtualBox. To connect the VHD to the new VM, choose the file and click Choose.
Hard drive selection in the VM Creation Window
8. Choose Create.
Create VM in the VM Creation Window
9. Now you may start the virtual machine. As seen below, choose Normal Start.
Turning on the virtual machine
10. The sign-in screen should be identical to the one on the physical device.
Sign-in Screen for the Virtual Machine
11. After entering in, you’ll note that the virtual computer is a carbon clone of the original device, right down to the user accounts and software loaded. The virtual and real machines are identical.
When you need to virtualize a physical disk, whether it’s a live OS or not, Disk2vhd may save you a lot of time. You’ve made it this far and are now ready to virtualize your physical equipment and enjoy the rewards.
What machines are you going to virtualize?
If you want to learn how to convert physical machines into virtual disks, then the “disk2vhd alternative” is a great tool. It creates a virtual disk image of your physical machine and allows you to run it in VMware or Hyper-V.
- disk2vhd vmware
- disk2vhd virtualbox
- disk2vhd windows xp
- create hyper-v image from physical machine
- disk2vhd download