Search This Blog

Wednesday, November 12, 2014

Convert Generation 1 VM to Generation 2 VM

 

Note:- Before we start, please do understand that this process is unsupported. Do it on your own risk and not guarantee that it will work. It is recommended to back up your existing virtual machine before convert to Gen 2.

Before we convert Generation 1 VM to Generation 2 VM, make sure the guest operating system is running either

  • Windows 8.1
  • Windows Server 2012 R2

Step 1

Download Convert-VMGeneration.ps1 script from Codeplex (Credit to John Howard). This script only allow conversion from Gen 1 to Gen 2. You cannot convert from Gen 2 back to Gen 1 VM.

Make sure existing Gen1 virtual machine has

  • Turn off
  • No check point
  • Turn off Hyper-V Replica for this particular VM
  • Not guest cluster VM using shared VHDX
  • Turn off Windows Recovery Environment
  • “reagentc /disable”

image

  • VM not pass through disk or differencing disk. If your virtual disk is using differencing disk, the script will try to convert to dynamic disk.

Step 2

Execute .\Convert-VmGeneration.ps1 –VMName Gen1 –Path “G:\VM\Gen1”

image

A new VM is created with the name (Generation 2).Boot the VM to verify that the conversion is successful. If everything working fine, then you can enable back Windows Recovery Environment by typing

“reagentc /enable”

image