First of all create a new generation 2 VM that we’ll use with our new VHDX we created using Disk2VHD.
Don’t create a new vdhx but select to use an existing one and point it to the one we just created with Disk2VHD.
Rename it if needed to something more suitable.

Don’t boot the VM but add a DVD and attach the Windows Server ISO of the version your vhdx contains to the DVD

diskpart

lis disk

lis vol

select volume 3

assign letter L:

FORMAT FS=FAT32 LABEL=”BOOT”

exit

bcdboot C:\Windows /s L: /f UEFI

Disk2VHD on a Generation 2 VM results in an unbootable VHDX

Windows 10 bootrec /fixboot access is denied

https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/windows-10-bootrec-fixboot-access-is-denied/747c4180-7ff3-4bc2-b6cc-81e572d546df?auth=1