qemu: fix EFI nvram removal on domain undefine
When undefining a UEFI domain its nvram file has to be properly handled as well. It's mandatory to use one of --nvram and --keep-nvram options when 'virsh undefine <domain>' is issued for a UEFI domain. To fix the bug as reported, virsh should return an error message if neither option is used and the nvram file should be removed when --nvram is given. The cause of the problem is that when qemuDomainUndefineFlags() is invoked on an inactive domain the path to its nvram file is empty. This commit aims to fix this by formatting and filling in the path in time for the nvram removal code to run properly. https://bugzilla.redhat.com/show_bug.cgi?id=1751596Signed-off-by: NPavel Mores <pmores@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录