@stormi Simple install: Using XCP 8.2.1 pool (current updates), build new VM, use Generic Linux UEFI template, using shared pool storage, install Debian 11 from CD as UEFI boot. No custom config needed.
Guest VM boots correctly using the special EFI/debian startup. VM can reboot correctly. VM can be powered off and on and boot correctly as long as it stays on the same host in the pool. It also works correctly on a single host system even after the host reboot.
Starting the VM on a different host or live migrating to a different host in the pool and then rebooting the VM, it fails to boot correctly because it does not have the correct EFI boot variables. Booting the VM on the original host (after the guest has been used on a different host) does not fix the issue.
You can view the EFI boot config vars with the command efibootmgr. You can see the before (good) and after (non-working) output:
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0001,0000,0003,0002
Boot0000* UiApp
Boot0001* UEFI Misc Device
Boot0002* UEFI PXEv4 (MAC:D6C87DE081C8)
Boot0003* EFI Internal Shell
Boot0004* debian
Boot0000
Boot0001
Boot0002
Boot0003
Boot0004
Running grub-install on the debian VM will 'fix' the EFI problem until the VM moves again.