VHD to VHDX conversion made easy with PowerShell

A couple of weeks ago I wrote “3 Easy Steps to Migrate to Hyper-V 2012 R2” talking about how to migrate VM’s from Windows Server 2008 R2 to Windows Server 2012 R2. Since then I keep hearing the same question over and over again.

Question: When you migrate VMs from Hyper-V in Windows Server 2008 R2 to Hyper V in Windows Server 2012 R2 can you also automate conversion from vhd to vhdx? And can it be done with minimum interruption to the operation of the workload of the VM?

Answer: YES!

Our friends Aidan Finn and Didier Von Hoye are using a really cool PowerShell script to automate the entire process. The only challenge here is how to accomplish the virtual disk conversion without interrupting the operation of the workload on the VM. The solution is really simple. Last year Veeam Backup & Replication V7 introduced the Virtual Lab functionality for Hyper-V which is the perfect fit for this situation.

Virtual lab provides a mechanism to construct an exact duplicate of your Hyper-V environment (exact right down to the IP addresses of the VMs) and run it in an isolated stub network attached to your production network. Once the lab is in place you can now do all kinds of cool testing and development stuff, including but not limited to migrating from vhd to vhdx files, without having to shut down the production VMs. If you are not familiar with the Veeam virtual lab – you should take the time to give it a look. This is made for a backup recovery verification technique by going through the restore process on a scheduled basis, but also as a good mechanism to test changes such as Windows Update or Domain Schema changes. The figure below shows two VMs in a Veeam Virtual Lab:

Conversion from vhd to vhdx

Once the conversion from vhd to vhdx is complete you can execute a controlled migration or just run a VM recovery to get the VM’s into the production environment. You will still need to shut down the old .vhd based VM’s before recovering the vhdx versions but there will be minimum interruption of the infrastructure workloads. It’s a great solution!

Once again Microsoft (with 2 awesome MVP’s) and Veeam working together to make things better in your virtual environment! Have you gone about converting to vhdx files yet? If so, what tips can you share about the process? If not, does this help you get there? Share your comments below.

See also:

Get weekly blog updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam’s Privacy Policy
Cheers for trusting us with the spot in your mailbox!
Now you’re less likely to miss what’s been brewing in our blog with this weekly digest.

Eliminate Data Loss
Eliminate Ransomware

#1 Backup and Recovery


  • Adam says:

    How does this conversion account for the activity on the live VM in the production environment while doing the conversion? At what stage does it sync the changes from production to the VM Lab?

  • Andrew Zhelezko says:

    As far as I understand, it doesn’t make any sync between the production VM and VM in Virtual Lab. Script shuts down all VMs, performs disks conversion and reconfiguration and turns VMs on if required. With Virtual Lab you can test Veeam backups in automatic mode and see if they are recoverable.

  • Adam says:

    Ahhh so this still doesn’t give you a “live” conversion from VHD to VHDX, you still have to shutdown your live VM. This just tests if you can do it before hand. If only there is a way to live migrate from a vhd to vhdx with no/or as little as possible downtime.

  • Andrew Zhelezko says:

    Yes, no “live” conversion indeed. Anyway, what are the features of VHDX you want that badly? And why isn’t it possible to you to schedule a maintenance window at some point?

Leave a Reply

Your email address will not be published.