On Mon, Dec 29, 2025 at 12:40:34AM +0100, Andrea Bolognani via Devel wrote: > This test case demonstrates how to manually configure an x86_64 > guest to use the uefi-vars device. > > It currently fails because the QEMU driver does not yet allow > the use of JSON for NVRAM. That will change in a future commit. > > Signed-off-by: Andrea Bolognani <[email protected]> > --- > ...-manual-efi-qemuvars-q35.x86_64-latest.err | 1 + > ...-manual-efi-qemuvars-q35.x86_64-latest.xml | 36 +++++++++++++++++++ > .../firmware-manual-efi-qemuvars-q35.xml | 19 ++++++++++ > tests/qemuxmlconftest.c | 2 ++ > 4 files changed, 58 insertions(+) > create mode 100644 > tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.err > create mode 100644 > tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.xml > create mode 100644 tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.xml > > diff --git > a/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.err > b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.err > new file mode 100644 > index 0000000000..e5f67f8d09 > --- /dev/null > +++ b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.err > @@ -0,0 +1 @@ > +unsupported configuration: Unsupported nvram format 'json' > diff --git > a/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.xml > b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.xml > new file mode 100644 > index 0000000000..a16c404eaf > --- /dev/null > +++ b/tests/qemuxmlconfdata/firmware-manual-efi-qemuvars-q35.x86_64-latest.xml > @@ -0,0 +1,36 @@ > +<domain type='qemu'> > + <name>guest</name> > + <uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid> > + <memory unit='KiB'>1048576</memory> > + <currentMemory unit='KiB'>1048576</currentMemory> > + <vcpu placement='static'>1</vcpu> > + <os> > + <type arch='x86_64' machine='pc-q35-10.0'>hvm</type> > + <loader type='rom'>/usr/share/edk2/ovmf/OVMF.qemuvars.fd</loader> > + <nvram format='json'>/path/to/guest.json</nvram>
IMHO it is wrong to be trying to squash the JSON vars storage concept into the <nvram> element. It isn't providing NVRAM to the guest and "json" is not a valid -blockdev format type, so this is overloading concepts. IMHO there needs to be a new config element to represent the new UEFI vars service persistence concept. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
