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>
}
}
- 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);
- } else {
- if (vm->def->os.loader)
- nvram_path = g_strdup(vm->def->os.loader->nvram);
}
if (nvram_path && virFileExists(nvram_path)) {