Hello,
Moving a Windows Server 2022 VM in Proxmox from Legacy BIOS (SeaBIOS) to UEFI (OVMF) is not a simple toggle, because the boot firmware type is fundamental to how the OS was installed. If the VM was originally installed under SeaBIOS, the disk layout will be MBR-based, and Windows will not boot if you simply switch the VM to OVMF. To make the transition correctly, you need to convert the disk partitioning to GPT and ensure the EFI System Partition exists before changing the VM firmware.
The supported method is to use Microsoft’s mbr2gpt.exe tool inside the Windows Server 2022 guest. Run it from an elevated command prompt with mbr2gpt /convert /allowFullOS. This will convert the system disk from MBR to GPT and create the EFI System Partition. Once that completes successfully, shut down the VM. In Proxmox, edit the VM configuration (/etc/pve/qemu-server/<VMID>.conf) and change bios: seabios to bios: ovmf. You must also add an EFI disk, for example efidisk0: local-lvm:vm-<VMID>-disk-efi,size=1M. If Secure Boot is required, set machine: q35 and efitype:4m with efidisk0 enabled.
After that, start the VM. Windows should now boot in UEFI mode. You can confirm by running msinfo32 inside the guest and checking that “BIOS Mode” shows “UEFI.” At this point, Secure Boot can be enabled from the VM’s OVMF settings if required.
The critical point is that you cannot just flip SeaBIOS to OVMF without preparing the disk. If you do, Windows will fail to boot with error code 0xc000000e. The conversion with mbr2gpt ensures the OS can boot under UEFI.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.