Wondershare Recoverit

Windows Data Recovery

  • Recovers deleted or lost files from hard drive effectively, safely and completely.
  • Supports data recovery from 500+ data loss scenarios, including computer crash, partition loss, accidental human error, etc.
  • Supports 1000+ file formats recovery with a high success rate and without any quality loss.
Free Download Free Download Free Download Learn More >
hard drive recovery

How to Convert VHD to VMDK

Wondershare Recoverit Authors

Nov 16, 2024 • Filed to: Windows Computer Solutions • Proven solutions

Do you find yourself needing to convert a virtual disk from one format type to another? Converting these files can be required when migrating your VM between different hosts, or if the file needs updating. Popular formats are VHDX and VMDK; however, not all products support this conversion process. Today's blog post discusses how Hyper-V Virtual Hard Disks (VHD) have been converted into VMware Format Disk Kits (.vmdk).

Worried for data loss during VHD-VMDK convert, Try Wondershare Recoverit to Perform Data Recovery

article-safe-itemSecurity Verified. Over 7,302,189 people have downloaded it.

What is a VMDK?

VMDK stands for virtual machine disk, and it is a file format similar to an .ISO. One can convert VHD files (virtual hard disks) to VMDK files, which means that one can create virtual machines from a disk image, without the need of having a physical hardware. Converting the disk images includes adding information such as boot sequence, etc., to allow the guest OS to run properly in the VM environment.

What is VHD?

VHD stands for Virtual Hard Disk, which is a format that allows one to create a file on the disk instead of the partition. It is mainly used in Microsoft's Hyper-V server virtualization program and was originally known as Virtual Server Disk (VSD). A VHD can be assigned using all available space or it can be placed on different drives. Also, they are stored in .BIN files, so one cannot access them without mounting them.

Virtual hard disks are popular because they can be stored anywhere the physical host can access. These files have a maximum size value that specifies how large they will appear to virtual machines, but there are two types: fixed-size and dynamically expanding. Fixed size VHDs will automatically take up the specified amount of physical disk space on your host computer's file system whereas dynamic VHDs allocate space only as needed.

Why do you need to convert VHD to VMDK?

The VHD to VMDK conversion is needed when you are planning on migrating a virtual machine from one hypervisor to another. If the VM's disk format was incorrectly selected, then converting it can be helpful as well.

Check the VHD Content Before You Convert VHD to VMDK

Take this step as a precaution before converting a VHD to VMDK. It's to ensure that you're converting a healthy VHD file and that its content can be viewed too. By doing so, you can prevent yourself from wasting time and effort on converting the wrong VHD.

How to Convert VHD to VMDK with qemu-img

Using qemu-img in Linux

Here, we are using Ubuntu Linux to run qemu-img.

First of all, you need to install it from online repositories using the following command:

sudo apt-get install qemu-utils

Now, navigate to the directory having the virtual disk images

To convert the VHD to VMDK, you need to run the following command:

qemu-img convert /media/user1/data/WinServer2016.vhdx -O vmdk /media/user1/data/WinServer2016qemu.vmdk -p

Where:

-O – define the output file format

-p – show the progress bar

Wait until the conversion process is finished.

Using qemu-img in Windows

Download the qemu-img on your system and install it.

Convert VHD to VMDK in Windows

After finishing the installation of qemu-img on your computer, run CMD as administrator and navigate to the location where you just installed qemu-img.

The method to convert VHD to VMDK in Windows using qemu-img is the same. You need to use the same commands as used in Linux.

Creating a VMware VM by Using the Converted Virtual Disk

Once you have converted VHD to VMDK, you’d be able to covert Hyper-V to VMware virtual machines as well. Once you have converted, you can import them to your new VMware Virtual Machine to complete the conversion. You can use this method for Virtual Machines running on both Workstation and ESXi.

If you want to find out the method to convert Hyper-V to VMware, follow the instructions given in the next sections.

VMware Workstation

Assuming you need to make a virtual machine utilizing a converted disk from the VHD to VMDK Workstation, simply make another VM and select that you want to utilize a current virtual disk.

For instance, if you want to set up a new VM in VMware Workstation. Hit File > New virtual machine.

Here, we are going to specifically focus on the steps to import a converted VHD disk to the VMware Workstation Virtual Machine. So make sure to pay attention to the following steps:

vhd to vmdk

vhd to vmdk

vhd to vmdk

Going through the process, you may come across a dialog window that would suggest you that you may convert an existing virtual disk to another format. Whether or not you want to convert, the choice is yours. If you don’t have an older version of Virtual Machine, you should convert the format so it can be used on a newer version of Virtual Machine. You may not be able to use a newer format on an older version of Virtual Machine.

If you have a source Hyper-V Virtual Machine configured to use BIOS, then make sure to choose BIOS as your firmware type in VM options. If you don’t do so, the VMware Virtual Machine to which you have attached a virtual disk converted from the Hyper-V format to the VMware format will not boot.

To find out this setting and check the option, you need to go to VM > Settings and then select the Options tab > Advanced.

vhd to vmdk

Once you have completed the above steps, you should get your Virtual Machine boot correctly. After its successful boot, you can now install the VMware tools.

vhd to vmdk

VMware ESXi

You can likewise change VHD over to VMDK and import the converted virtual disk to an ESXi-hosted workstation. However, whatever is the format for Workstation and ESXi is a whole different scenario and matter. The difference between virtual disks is that the Workstation disk has a single VMDK file built-in descriptor while the ESXi’s virtual disk has two separate files. The virtual disk on ESXi Workstation has two files where one is a disk descriptor file and the other is a data file. If you have used any of the above two methods to convert the Hyper-V format for an ESXi-hosted virtual machine, you will be required to convert that virtual disk from the Workstation format to the ESXi format. If you don’t convert it to the ESXi format, you may come across the “Unsupported or invalid disk type 2” error.

vhd to vmdk

In case you want to change Hyper-V VMware on VM level, it can be converted from VHD to VMDK and afterward connect a converted VMDK virtual disk to another newly created Virtual Machine. Qemu-img can be utilized as a VHD to VMDK converter with some other similar options available as well. You can use this method without spending anything other than your time and little effort. The methods permit you to change Hyper-V VHD over to VMware VMDK.

Conclusion

If you are converting your virtual machine from one host to another, you may need to convert from one virtual disk format to another. If you are currently on VHD and want to convert to VMDK, the above methods can be used to accomplish this task.

We hope that you find these methods useful and can also be able to create a new VMware Virtual Machine using the converted disk.

If you come across any difficulty or face errors that are not addressed here, it’s recommended to consult a professional technician or an expert.

FAQs

Recoverit author

Theo Lucia

chief Editor

Home > Resources > Windows Computer Solutions > How to Convert VHD to VMDK