From 2cd5c70ae785ab0d93576154dec0b740cd7a3a1e Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 22 Oct 2026 10:13:01 -0300 Subject: [PATCH] docs(kvm): the Secure Boot documentation omits the keys and the rpower path Two statements about this branch are narrower than the code. Commit 1edcddab8 says a node with a machine type xCAT cannot judge "failed at mkvm". firmware_machine_error is returned by build_xmldesc, and makedom calls build_xmldesc for a node whose domain is not yet built, so the refusal also reaches the rpower boot of that node. The POD of firmware_machine_error now names both callers. The Secure Boot section of the ipxe guide did not name firmware:efi-secureboot at all. It now says what mkvm asks libvirt for, why both the secure-boot feature and enrolled-keys are asked for, and what a hypervisor without such a firmware answers. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- docs/source/advanced/ipxe/index.rst | 13 +++++++++++++ perl-xCAT/xCAT/KVMUtils.pm | 3 +++ 2 files changed, 16 insertions(+) diff --git a/docs/source/advanced/ipxe/index.rst b/docs/source/advanced/ipxe/index.rst index a77e4d70c8..4800415b94 100644 --- a/docs/source/advanced/ipxe/index.rst +++ b/docs/source/advanced/ipxe/index.rst @@ -76,6 +76,19 @@ A shim also accepts a kernel that a MOK key signs, so a site that signs ``xcat/g Two paths stay Secure Boot off. A kernel without an EFI stub boots through ``elilo-x64.efi``, and ESXi boots through ``esxboot-x64.efi``. No key signs either file. Boot these nodes with Secure Boot off. +A KVM node takes Secure Boot from ``vm.othersettings`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``vm.othersettings`` of a KVM node takes ``firmware:efi-secureboot``. ``mkvm`` then asks libvirt for a firmware with the ``secure-boot`` feature and with the UEFI keys enrolled, and places the node on ``q35``, the only machine type the x86_64 OVMF descriptors target:: + + chdef cn1 vmothersetting=firmware:efi-secureboot + +Both features are asked for, because the two are separate. ``secure-boot`` names a firmware that can verify what it boots, and ``enrolled-keys`` names the key store that decides what passes. A firmware with ``secure-boot`` and an empty key store boots an unsigned binary. On an EL 10 host the descriptors ``30-edk2-ovmf-x64-sb-enrolled.json`` and ``40-edk2-ovmf-x64-sb.json`` name the same OVMF binary and differ only in that key store. + +A hypervisor that ships no such firmware refuses the domain with ``Unable to find 'efi' firmware that is compatible with the current configuration``, rather than starting the node on a firmware that verifies nothing. + +``firmware:efi`` keeps its meaning and asks for no feature, so a node that asks only for UEFI takes the firmware its hypervisor prefers. + Known limits of the upstream loader ----------------------------------- diff --git a/perl-xCAT/xCAT/KVMUtils.pm b/perl-xCAT/xCAT/KVMUtils.pm index 6214737cb4..d459b1453f 100644 --- a/perl-xCAT/xCAT/KVMUtils.pm +++ b/perl-xCAT/xCAT/KVMUtils.pm @@ -498,6 +498,9 @@ sub firmware_error { Only the i440fx family is judged, and only on x86_64. xCAT does not know which machine types a hypervisor offers, so any other value goes to libvirt, which reports a machine type it cannot use. + + build_xmldesc returns the message, and both mkvm and makedom call build_xmldesc, so + the refusal reaches mkvm and the rpower boot of a node whose domain is not yet built. Arguments: $firmware - the result of requested_firmware, or undef $machine - the machine: setting of vm.othersettings, or undef