Preserve UEFI NVRAM variable store

Preserve NVRAM variable store during stop/start, hard reboot, live
migration, and volume retype.

This does not affect cold migration or shelve.

For UEFI guests (hw_firmware_type=uefi), every time the instance is
started, the UEFI variable storage for that instance
(/var/lib/libvirt/qemu/nvram/instance-xxxxxxxx_VARS.fd) is deleted
and reinitialized from the default template.

The changes are based on this patch by Jonas Schäfer to preserve the
vTPM state:
https://review.opendev.org/c/openstack/nova/+/955657

Closes-Bug: #1633447
Closes-Bug: #2131730
Change-Id: I444a9285c07a04bf08a73772235f8dd73d75e513
Signed-off-by: Nicolai Ruckel <nicolai.ruckel@cloudandheat.com>
This commit is contained in:
Nicolai Ruckel
2025-07-22 09:49:55 +02:00
parent 264e868d49
commit 35b1945522
7 changed files with 74 additions and 19 deletions
@@ -0,0 +1,7 @@
---
fixes:
- |
NVRAM variable store is preserved during stop/start, hard reboot, and live
migration by passing the corresponding flag to libvirt.
See https://bugs.launchpad.net/nova/+bug/1633447 for more details.