mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: honour user's nvram path when undefining VM
When undefining a VM, we must optionally delete any NVRAM that might exist. When using firmware auto-select we always check the generated path, ignoring any user specified path. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
392292cd99
commit
5adfb34723
@ -6615,11 +6615,10 @@ qemuDomainUndefineFlags(virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm->def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) {
|
if (vm->def->os.loader->nvram) {
|
||||||
|
nvram_path = g_strdup(vm->def->os.loader->nvram);
|
||||||
|
} else if (vm->def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI) {
|
||||||
qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path);
|
qemuDomainNVRAMPathFormat(cfg, vm->def, &nvram_path);
|
||||||
} else {
|
|
||||||
if (vm->def->os.loader)
|
|
||||||
nvram_path = g_strdup(vm->def->os.loader->nvram);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nvram_path && virFileExists(nvram_path)) {
|
if (nvram_path && virFileExists(nvram_path)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user