XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Guest VM UEFI NVRAM not saved / not persistent

    Scheduled Pinned Locked Moved Advanced features
    13 Posts 3 Posters 694 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stormiS Offline
      stormi Vates 🪐 XCP-ng Team
      last edited by

      I never met this issue but we'll try to reproduce. We met a similar issue which may have the same root cause, though: if you clear the EFI variable store from a debian VM (at least the version we had tested at the time, 10 or 11, maybe both), then it becomes unbootable, where most other OSes can boot and populate it back.

      1 Reply Last reply Reply Quote 0
      • stormiS Offline
        stormi Vates 🪐 XCP-ng Team
        last edited by

        Is this on XCP-ng 8.2 or 8.3?

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          Andrew Top contributor @stormi
          last edited by

          @stormi I'm using 8.2.1 (updated July 2024).

          If you read Debian's docs about UEFI boot it explains why they do something different than everyone else and how to fix it so it works. I use UEFI boot for Debian and use the removable media path install it boots every time on XCP.

          I think there are several issues, each can cause the same failure to boot the VM.

          If you upgrade XOA to UEFI with Debian then you need to install the extra boot files so it always boots on XCP.

          1 Reply Last reply Reply Quote 0
          • stormiS Offline
            stormi Vates 🪐 XCP-ng Team
            last edited by

            @Andrew do you still have the exact steps to reproduce? Must you start with a Debian VM booting in BIOS mode and then switch to UEFI?

            A 2 Replies Last reply Reply Quote 0
            • A Offline
              Andrew Top contributor @stormi
              last edited by

              @stormi I'll build a new VM and test it.

              1 Reply Last reply Reply Quote 0
              • A Offline
                Andrew Top contributor @stormi
                last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • stormiS Offline
                  stormi Vates 🪐 XCP-ng Team
                  last edited by

                  With such simple reproduction steps, I wonder why we haven't more reports about it.

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    Andrew Top contributor @stormi
                    last edited by Andrew

                    @stormi said

                    With such simple reproduction steps, I wonder why we haven't more reports about it.

                    Because the default VM install uses BIOS boot... ?
                    (edit) This is only(?) a Debian Linux UEFI boot on a XCP pool issue.

                    stormiS 1 Reply Last reply Reply Quote 0
                    • stormiS Offline
                      stormi Vates 🪐 XCP-ng Team @Andrew
                      last edited by

                      @Andrew Yes, probably, but still, I thought more people would use UEFI.

                      1 Reply Last reply Reply Quote 0
                      • stormiS Offline
                        stormi Vates 🪐 XCP-ng Team
                        last edited by

                        We are implementing tests in our CI to detect this issue and protect against regressions, then we'll investigate the cause.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post