Hyper-V migrate Gen1 VM to Gen2 to activate TPM

Hyper-V migrate Gen1 VM to Gen2 to activate TPM

Hi All,

Last year i moved from ESXi to HyperV on a NUC.

Just copyed the required VM and i still have a Windows Server 2016.

And yes, i am aware of the Windows Server 2016 Lifecycle

I had a requirement to use TPM on a Server. So let’s check with this PowerShell Command

Get-Tpm

Let’s check the Hyper-V Settings - No TPM Settings available

The VM is still a Generation 1

Get-VM -Name ICESRV04
Get-VM -Name ICESRV04 | fl

Let’s check with Disk Management - still MBR no UEFI Boot

diskmgmt.msc

I’ve copyed the C:\Windows\System32\MBR2GPT.exe from a Windows Server 2022 to C:\Temp\MBR2GPT.exe of my Windows Server 2016 Server

Added the Windows 2022 Eval ISO

Booted into the Windows 2022 from the DVD

Select “Repair your computer”

Select “Troubleshoot”

Select “Command Promt”

Figured out the Temp Folder and run

MBR2GPT.exe /?

MBR2GPT.exe /validate
MBR2GPT.exe /convert

Rename the VM to “ICESRV04_Old”

Create a new VM

Set the Name

Select Generation 2

Select existing VHDX

Now TPM can be enabled in the Security Settings of the VM

Let’s start the VM

Start Device Manager and Activate “show hidden devices”. Remove the old Network Adapters.

devmgmt.msc

Now you can set the Static IP Address back on the NIC

Now add the Data Disk, and bring it back online

diskmgmt.msc

Get-Tpm

Summary

I’ve shown you how to Upgrade your Disk to GPT and UEFI so you can create a Gen2 Hyper-V VM that supports TPM.

Regards
Andres Bohren

Windows Logo