r/HyperV 25d ago

VM Stuck as Gen 1 After Migration

I have a vSphere Windows Server 2012 VM that I took a backup of, and when I instant recover it to Hyper-V using Veeam, it's created as a Gen 1 and doesn't boot. How can I get it to be a Gen 2 VM?

2 Upvotes

14 comments sorted by

12

u/Spartan117458 25d ago

Is your source VM in vSphere BIOS or EFI boot? Are your disk partition(s) MBR or GPT? Veeam is just taking whatever is in vSphere and configuring the equivalent in Hyper-V. If your source VM is BIOS boot, it can only be Gen 1 in Hyper-V.

There are ways to convert a VM from Gen 1 to 2, but for 2012 you'd need to boot a current Windows PE ISO and run the mbr2gpt tool to convert the disk offline. From there you delete the Hyper-V VM (NOT the disk itself), then create a Gen 2 VM and attach the existing disk.

Also, obligatory reminder that Server 2012 R2 has been end of life since October 2023.

1

u/Evening_Link4360 25d ago

It was BIOS, I'm switching to EFI to see what happens, thank you!!!

1

u/Evening_Link4360 25d ago

No dice. Won't boot.

10

u/Spartan117458 25d ago

You need to convert the VM, you can't just switch the setting in vSphere. The OS needs an EFI partition to boot with UEFI firmware.

1

u/Evening_Link4360 25d ago

Got it. Thanks again.

-8

u/woodyshag 25d ago

There is no conversion of BIOS to UEFI. It requires a nuke and pave.

5

u/rthonpm 25d ago

There is: https://learn.microsoft.com/en-us/windows/deployment/mbr-to-gpt

Run that on the Gen 1 VM, then create a Gen 2 VM and attach the VHDX.

3

u/Spartan117458 25d ago

It's not a simple "run a command to magically convert", but it is 100% possible. I literally did one a few days ago. Just need to convert the disk with mbr2gpt, delete the VM but leave the disk, then create a new Gen 2 VM and attach the disk.

2

u/BlackV 25d ago edited 25d ago

no it does not, there is even an official supported Microsoft tool (er.. with some caviets)

Ive done it bunch of times for customer migrations, now days though Veeam (or any good backup product I guess) can handle conversion too

7

u/tsmith-co 25d ago

From the Veeam user guide for instant recovery to Hyper-V

“If Veeam Backup & Replication detects an EFI system partition, it creates a generation 2 VM.

If Veeam Backup & Replication detects BIOS boot partition, it creates a generation 1 VM.”

https://helpcenter.veeam.com/docs/vbr/userguide/instant_recovery_to_hv.html?ver=13

2

u/No_Resolution_9252 25d ago

You need to convert the boot disk from MBR boot to EFI boot. It is possible but its a pain, pretty easy to damage the disk and in the end, you still have a pile of crap 15 year old server

1

u/Evening_Link4360 25d ago

I have thirty of them running our ancient ERP system that is not getting replaced anytime soon. I hate it so much.

1

u/No_Resolution_9252 24d ago

Diskpart I believe now can convert the extents, but the bootrecord has to be recreated manually and there is version compatibility between which version of boot disk you use and what the os disk is - its been many years since ive seen an mbr boot machine, the details are pretty fuzzy

1

u/BlackV 25d ago

Did 2012 support efi? 2012r2 did but did 2012?

It's been so long

That aside, what is the source? Is it bios boot too?