How To Convert VMDK to VHD Without Data Loss?


Position: How Tos - Disk Utilities - How To Convert VMDK to VHD Without Data Loss?

Summary
This guide discusses methods to convert a VMware VMDK disk to Hyper-V VHD with the help of Windows PowerShell and DiskGenius. DiskGenius is capable of converting virtual disk formats among VMDK, VHD and VDI without losing data and the converting process is very simple.
DiskGenius

DiskGenius - Advanced virtual disk manger software to convert VMDK/VHD/VDI without losing data.

ô  Free Download

Contents:


Virtualization is a popular solution used by personals and businesses to expand the utilization of hardware. Nowadays, users tend to use virtualization software such as Vmware to complete various task. However, many such programs are not compatible with each other, for example, VMware uses disks with format VMDK (virtual machine disk), while Microsoft uses VHD. So, you may wonder whether it is possible to convert VMDK to VHD or convert VHD to VMDK. The answer is YES. The following part will talk about methods to do the conversion.


VMDK VS VHD

What is a virtual machine?

A virtual machine (VM) is an application which is able to emulate a computer system so as to provide features of a physical computer. It is able to perform operations such as running operating system or software like a separated PC. A virtual machine is usually regarded as a guest, and it is created on another computing environment which is taken as a host.

A file with file extension. vmdk is Virtual Machine Disk File, and it is used to store data for virtual disk which is created by VMware virtual machine software. VMware designed the VMDK format to imitate operations of physical hard drives, such as store data, backup important data, install application, run OS, etc. A virtual disk may contain one or multiple VMDK files which are stored on the host computer or remote storage device. The count of VMDK files that are included in one virtual hard disk mainly accounts on the size of the virtual disk and the amount of data a user wants to store.

Convert VMDK to VHD

What is a virtual hard disk?

A virtual hard disk (VHD) is a kind of virtual disk used by virtual machines and it is similar to a physical hard drive in functions. A VHD usually has the same sectors as a physical disk, and thus it is capable of operating just like a traditional physical disk, such as create files and folders, install OS, launch applications, etc. It is created on physical hard drive thought, it uses its own logical distribution. The size of a virtual hard disk can be fixed or flexible and it is managed and controlled by its parent OS or virtualization manager. Virtual disk were initially possessed by Connectix Inc., and then it was sold to Microsoft, after which it is used in virtual machines for Windows systems.

Difference between VHD and VMDK Files

VHD and VMDK file formats are used in virtual environments, and yet they are different in some aspects. This section will give a brief instruction of the differences between VHD and VMDK files.

A VHD file refers to a virtual machine hard disk, which was first created by Connectix for Virtual PC. It is able to clone or contain information of a regular hard drive, including files and folders of partitions. Multiple operating systems are allowed to resided on a single host machine. Thus, users become able to test software under different OS without installing another disk.

VMDK was initially created by VMware for its virtual appliance products and now this format can be used on many virtual appliances. It is protected with snapshots and continuous data protection technology. The VMDK file with file extension. vmdk can be used to store data or backup files, which is just like a regular physical hard drive. The size of a VMDK file can be quite large, such as 2TB is very common. Apart from VMWare's products, many other applications can use VMDK files, such as QEMU, Sun xVM, VirtualBox, SUSE studio, etc.


Why convert VMDK to VHD?

There might be quite a few reasons you want to convert VMDK to VHD, for instance, you are trying to migrate the entire environment of VMware to Microsoft Hyper-V, or you want to use Azure cloud services and thus want to transfer VMWare workloads to Azure.

Standardizing everything on Windows makes it easier for customers to manage it, as they don't need to conduct additional training. Plus, Windows Server already contains Hyper-V, thus cost can be cut to some extent. Some service providers may also tend to convert VMDK to VHD so that customers can quickly get familiar with products. Some users want to try different virtual machines on the basis the converting from VMDK to VDH does not cause any data loss.

"Hello, experts. I'm currently using VMWare Workstation Pro Ver12.5 on my desktop and am wondering whether it is possible to move it to Hyper-V. I mean the one-time conversion of virtual disk format from VMDK to VHD and the VMDK remains undisturbed. Thus, I can use either of them. I got an error when converting VMDK to VHD with PowerShell command. I'm not interested in fixing that error. Are there any other methods to do the conversion? A third-party tool is also OK as long as it can do the job for me."


Virtual disk manager

Professional disk manager software is essential especially when you want to manage disk space and partition for virtual machine. It is recommended to use DiskGenius to be your virtual disk manager. DiskGenius is fully-fledged data recovery & partition manager software and it supports the most commonly used virtual hard disk formats such as VMDK, VHD and VDI. Features related to virtual disks are the following:

  • Open and load virtual disk from host computer without running virtual machine.
  • Create VHD, VMDK, and VDI virtual disk.
  • Convert virtual disk formats among VMDK, VHD and VDI without losing data.
  • Convert physical hard drive to virtual disk without data loss.
  • Mange partitions on virtual disks such as create, delete, format, resize, clone, image partition.
  • Recover lost files and partitions from virtual disk.
  • Clone virtual disk and partitions, image virtual disk and partition.

Method #1: Convert VMDK to VHD with DiskGenius

DiskGenius is able to convert virtual disk formats among VMDK, VHD and VDI without losing data. The converting can be completed without launching virtual machines and does not affect data on original virtual disk.

Step 1. Install and launch DiskGenius from your physical computer. Then click Disk menu and choose Convert Virtual Disk Format.

Convert VMDK to VHD

Step 2. The Convert Virtual Disk Format windows shows up as follows. Click Source Virtual Disk button to select the VMDK disk you want to convert.

Convert VMDK to VHD

Step 3. Click the dropdown list next to Convert option and you can see three options: VMWare Virtual Disk (vmdk), VirtualPC Virtual Disk (vhd) and VirtualBox Virtual Disk (vdi). Here we need to choose Virtual PC Virtual Disk (vhd) item.

Convert VMDK to VHD

Step 4. Click Select button and set a location to save the VHD disk after converting.

DiskGenius converts virtual disk format for selected disk and then saves the new virtual disk to a specified location so that the original disk won't be changed or damaged. Please make sure the target location you select is large enough to store the virtual disk.

Convert VMDK to VHD

Step 5   Click Convert button and DiskGenius starts to covert VMDK to VHD.


Method #2: Convert VMDK to VHD with PowerShell

This method discusses how to convert VMDK to VHD with the help of Microsoft virtual machine converter 3.0

Step 1. Download the and install the Conversion Kit.

Windows does not build in the virtual machine converter and you need to install the conversion kit manually. Once it is installed, you will be able to convert virtual disks from VMWare to Hyper-V. But the conversion kit requires to connect to the VMware and Hyper-V host.

Step 2. Import the PowerShell Module.

The virtual disk conversion kit comes with a PowerShell mode which enables to do offline conversion. Run PowerShell once Microsoft Conversion Kit is installed. Chance the directory to C:\Program Files\Microsoft Virtual Machine Converter and then import the PowerShell module that ships with MVMC by executing the command below:

Import-Module MvmcCmdlet.Psd1

Step 3. Convert VMDK to VHD.

When the module is imported successfully, you can do the conversion via following command. Here, we have a VMDK file named MyDisk.vmdk and it is stored in F:\Temp\VMX\ folder. The resulting VHD file is saved to F:\Temp\VHD\.

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath F:\Temp\VMX\MyDisk.VMDK -VHDType DynamicHardDisk -VHDFormat VHD -Destination F:\Temp\VHD\MyDisk

VM converting might fail due to some reasons. If that happens, you can check log files generated by MVMC and view warning strings. Then you can figure out causes and solutions. Alternatively, you can use DiskGenius to do the conversion, which is much easier.


Convert VHD to VMDK

The content above tells how to convert VMDK to VHD and you may wonder whether it is possible to convert VHD to VMDK. The answer is YES. DiskGenius also supports to converting VHD to VMDK without losing data.

Launch DiskGenius from your physical computer without running virtual machines, and then choose Disk menu and click Convert Virtual Disk Format. For rest steps, you can refer to the process of converting VMDK to VHD.


Conclusion

This guide discussed two ways of converting VMware virtual disk VMDK to VHD disk and the converting process is quite easy. We hope you can convert virtual disk format without losing data on your own. DiskGenius is advanced virtual disk manager which is able to manage disk space and partition, recover lost data, convert virtual disk type, etc. without launching virtual machine. If you feel this guide useful, please share it to help more users.


Related articles

DiskGenius

DiskGenius - Safely and easily convert virtual disk among VMDK, VHD and VDI without losing data.

ô  Free Download
Copyright © 2010-2024 Eassos Ltd. All Rights Reserved.