Converting VM’s from VMware to Hyper-V in seconds (Part 1)

Converting VM’s from VMware to Hyper-V in seconds (Part 1)
Converting VM’s from VMware to Hyper-V in seconds (Part 2)
Converting VM’s from VMware to Hyper-V in seconds (Part 3)
Finally!!!
A couple of months ago I started migrating from VMware to Hyper-v with frustrating speeds, 17MB/s, this is because of the file conversion which processes all data.
When searching for a better solution I came across this Youtube video:

http://www.youtube.com/watch?v=OE2JCkVgv38

After seeing this I jumped through the roof.
For this technology to work I needed a Netapp in Clustered mode with Ontap 8.2, and I didn’t have one laying around… till last week.

Converting VMDK to VHDX in seconds, HOW!?

We need a Netapp controller to do this trick.
Netapp has equipped their API with some great features, one of them is the cmdlet ConvertTo-NaVhdx. (alias ConvertTo-NcVhdx)
This Powershell cmdlet calls the Netapp API function which converts the file to VHDX by using Flexclone to clone the data blobs.
After the clone it rewrites the specific metadata in the header section of the VMDK which changes the format to a readable VHDX.
It seems like it only changes data in the header section of the file which is about 1mb in size!

With a simple script like below you can convert a disk in seconds from VMDK to VHDX.

Import-Module 'DataONTAP' -Verbose:$false

$NTAPUser = "admin"
$NTAPPassword = "$ecret"
$secpasswd = ConvertTo-SecureString $NTAPPassword -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($NTAPUser, $secpasswd)
$NTAP = Connect-NcController -Name 10.0.0.50 -EA Stop -Credential $mycreds -vserver vserver-01
       
$splat = @{}
$Splat = @{
'FollowParent'=$true
'SkipUnmap'=$true
}

ConvertTo-NcVhdx -SourceVmdk "/vol/nfs01/TestVM/TestVM.vmdk" -DestinationVhdx "/vol/nfs01/TestVM/TestVM.vhdx" @Splat

The following video shows the NFS share on the Netapp accessed through a windows server.
A VMWare VM called “TestVM2” is stored here with the VMDK file we want to convert to VHDX.
Simply kicking off the above powershell script the VMDK (47GB) is converted in seconds.

You can see the VHDX file beeing created.
Next thing is to create a VM, attach the new disk to the VM, boot!

MAT (powered by Project Shift)

MAT is a very nice piece of powershell work from a collab between Migration Mark (Microsoft), Michael Greene (Microsoft) and Glenn Sizemore (NetApp).
MAT is the complete ready-to-go solution to use for VM migrations using a Netapp and the “magic” conversion technology.
When your Netapp controller is ready to go, MAT configs the controller with the right settings and creates a vserver etc etc.
Globally MAT stores the VM info from VMware into a database, when you fire off the convert function the disk will be converted and a new VM is created in Hyper-V with the new converted disk.
MAT uses the above functionality from Netapp Data Ontap and the The Data ONTAP PowerShell Toolkit to convert the disk in seconds.
You can find more info here and download it here
They also made a great video showing off MAT 🙂
http://www.youtube.com/watch?v=IANszL-PuLY

You can edit the MAT powershell code to your own needs.

Requirements:
Netapp Controller with ONTAP 8.2 or higher in clustered mode
Netapp Data ONTAP PowerShell Toolkit
Netapp Flexclone License

In Part 2 I will discuss how to setup all the above.
– Config the Netapp
– Add Netapp storage to VMM

Any questions already? Shoot!

ps. I’m having some trouble with the Youtube video sizes, working on it 😉

2 thoughts to “Converting VM’s from VMware to Hyper-V in seconds (Part 1)”

Leave a Reply

Your email address will not be published. Required fields are marked *