mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 04:55:18 +00:00
qemuFirmwareFillDomain: Don't fill in firmware for network backed nvram
Prepare for network backed nvram by refusing the reset of nvram on boot and don't check whether it exists. We will not support filling it from a template. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Tested-by: Rohit Kumar <rohit.kumar3@nutanix.com>
This commit is contained in:
parent
bca731d0f5
commit
9d8abe0480
@ -1371,10 +1371,22 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
|
||||
def->os.loader->nvramTemplate)
|
||||
return 0;
|
||||
|
||||
if (!reset_nvram && def->os.loader->nvram &&
|
||||
virStorageSourceIsLocalStorage(def->os.loader->nvram) &&
|
||||
virFileExists(def->os.loader->nvram->path))
|
||||
return 0;
|
||||
if (def->os.loader->nvram) {
|
||||
if (!virStorageSourceIsLocalStorage(def->os.loader->nvram)) {
|
||||
if (reset_nvram) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("resetting of nvram is not supported with network backed nvram"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* we don't scrutinize whether NVRAM image accessed via network
|
||||
* is present */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!reset_nvram && virFileExists(def->os.loader->nvram->path))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ... then we want to consult JSON FW descriptors first,
|
||||
* but we don't want to fail if we haven't found a match. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user