]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuFirmwareFillDomain: Use FW descriptors to lookup template when resetting NVRAM
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Feb 2022 09:52:47 +0000 (10:52 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Feb 2022 08:03:20 +0000 (09:03 +0100)
commitd192e522ef42c498d655756a383e20f8294c1e2d
tree5cc4c9ab13f6536611c445d4bee5a3ac7743dda6
parentf21166c81447c4ea76861fa2ef6400f13e44f000
qemuFirmwareFillDomain: Use FW descriptors to lookup template when resetting NVRAM

If VIR_QEMU_PROCESS_START_RESET_NVRAM flag is passed when
starting a domain, then user requested to overwrite the domain
specific NVRAM with the one from template. But it is very likely
that the path to the template is not stored in the domain
definition, which in turn makes the copy function
(qemuPrepareNVRAM()) fail.

The solution is simple - when preparing domain, specifically when
deciding whether the path to the template should be autofilled,
ignore any existing NVRAM file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_firmware.c