Use NetApp to Convert VMDK to VHD

Use NetApp PowerShell to easily convert a VMDK to VHD.

John Savill

July 16, 2014

1 Min Read
data stored on disk

Q: What's required to use the NetApp fast conversion of a VMDK file to VHD?

A: Normally, when a VMDK file is converted to VHD, such as with the Microsoft Virtual Machine Converter solution, a new VHD file is created and then the data blocks are copied from the VMDK source file to the target VHD file. For example:

MVDC.exe D:TestESXTest1.vmdk D:TestESXTest1.vhd

Depending on the underlying storage and size of the source VMDK file, this can take many minutes to complete. NetApp storage has the ability to use a sub-LUN clone technology that essentially creates a new VHD header file; however, for the actual data blocks the existing VMDK is leveraged, and when the VHD changes in the future the modified blocks are automatically allocated by the NetApp SAN.

To use this capability, the Data ONTAP PowerShell Toolkit is employed, which enables the very fast conversion using the ConvertTo-NaVhd PowerShell cmdlet. The following commands show everything required, which consists of loading the dataontap module, creating credentials to connec to to the NetApp controller, connecting to the controller (I'm connecting to a clustered NetApp environment in my demo), and then issuing the actual conversion command. In this example the same conversion takes about 20 seconds instead of many minutes with the Microsoft Virtual Machine Converter (MVMC) solution.

Import-module dataontap$cred=Get-Credential  connect-nccontroller  -Credential $credConvertTo-NaVhd D:TestESXTest1.vmdk

For more information about this process, see my "VMDK to VHD Conversion Technologies" video.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like