UEFI boot entries from imported VMDK VM do not persist

Mar 15, 2024
2
0
1
Hello,

we're new to Proxmox (fresh 8.1.4 installation) and are currently evaluating how to move VMs from a vSphere environment to Proxmox.

Our source VMs are Debian 12 booting from UEFI, i.e. GPT-partitioned etc. So a Proxmox VM needs to be booting from OVMF (UEFI), too.

The first steps are not much of a problem: create a VM with the imported disk gets a EFI Disk added on lvm-local storage. The VM then initially doesn't find the UEFI disk and attempts boot from PXE. Eventually, one ends up in the UEFI menu, can search for and find the proper shim boot entry to boot from (Boot maintenance options, Add boot option "SHIM1234", ...), save changes, boot continues and the OS comes up perfectly. efibootmgr shows the boot entry:

# efibootmgr -v
BootCurrent: 0007
Timeout: 3 seconds
BootOrder: 0007,0001,0002,0003,0004,0005,0006,0000
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI PXEv4 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0002* UEFI PXEv6 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
Boot0003* UEFI HTTPv4 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0004* UEFI HTTPv6 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv6([::]:<->[::]:,0,0)/Uri()N.....YM....R,Y.
Boot0005* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0006* UEFI QEMU QEMU HARDDISK PciRoot(0x0)/Pci(0x5,0x0)/SCSI(0,0)N.....YM....R,Y.
Boot0007* SHIM1234 PciRoot(0x0)/Pci(0x5,0x0)/SCSI(0,0)/HD(1,GPT,56ac19aa-8e0d-40da-9120-5dd61fc00c41,0x22,0x10089e)/File(\EFI\debian\shimx64.efi)

This is where the trouble starts:

On the booted OS, I re-install grub (grub-install) which reports success.

# grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.

Then I verify with efibootmgr -v that the GRUB entry was added and is marked as BootNext.

# efibootmgr -v
BootCurrent: 0007
Timeout: 3 seconds
BootOrder: 0008,0007,0001,0002,0003,0004,0005,0006,0000
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI PXEv4 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv4(0.0.0.00.0.0.0,0,0)N.....YM....R,Y.
Boot0002* UEFI PXEv6 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv6([::]:<->[::]:,0,0)N.....YM....R,Y.
Boot0003* UEFI HTTPv4 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri()N.....YM....R,Y.
Boot0004* UEFI HTTPv6 (MAC:BC24114689A2) PciRoot(0x0)/Pci(0x12,0x0)/MAC(bc24114689a2,1)/IPv6([::]:<->[::]:,0,0)/Uri()N.....YM....R,Y.
Boot0005* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0006* UEFI QEMU QEMU HARDDISK PciRoot(0x0)/Pci(0x5,0x0)/SCSI(0,0)N.....YM....R,Y.
Boot0007* SHIM1234 PciRoot(0x0)/Pci(0x5,0x0)/SCSI(0,0)/HD(1,GPT,56ac19aa-8e0d-40da-9120-5dd61fc00c41,0x22,0x10089e)/File(\EFI\debian\shimx64.efi)
Boot0008* debian HD(1,GPT,56ac19aa-8e0d-40da-9120-5dd61fc00c41,0x22,0x10089e)/File(\EFI\debian\shimx64.efi)

So I reboot ... and all the settings are lost. I am back in PXE boot, and no entries in the UEFI boot list. After going through the same boot entry modification in the UEFI UI, I can boot again and verify that yes ... none of the changes that were made before (both the "SHIM1234" from UEFI UI nor the "debian" one from grub) exist any more.

It's a bit like the EFIVAR EFI Disk is kind of "read-only".

Our environment is SecureBoot enabled on host and VM level, if that changes anything.

Does anyone else experience the same? Any clues?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!