mirror of
https://pagure.io/fedora-qa/createhdds.git
synced 2024-11-21 23:03:08 +00:00
libvirt: Undefine NVRAM when undefining domain
This is apparently necessary on aarch64, we get an error from libvirt otherwise. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
a886b9f4a9
commit
14abb9b3e1
@ -248,7 +248,7 @@ class VirtInstallImage(object):
|
||||
except libvirt.libvirtError:
|
||||
# domain may not be running, so this is fine
|
||||
pass
|
||||
dom.undefine()
|
||||
dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
|
||||
except libvirt.libvirtError:
|
||||
# domain may not exist, so this is fine
|
||||
pass
|
||||
@ -321,7 +321,7 @@ class VirtInstallImage(object):
|
||||
# maybe it died already
|
||||
pass
|
||||
try:
|
||||
dom.undefine()
|
||||
dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
|
||||
except libvirt.libvirtError:
|
||||
pass
|
||||
conn.close()
|
||||
@ -351,7 +351,7 @@ class VirtInstallImage(object):
|
||||
# the domain
|
||||
os.rename(tmpfile, self.filename)
|
||||
os.chmod(self.filename, 0o644)
|
||||
dom.undefine()
|
||||
dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
|
||||
conn.close()
|
||||
except:
|
||||
# if anything went wrong, we want to wipe the temp file
|
||||
|
Loading…
Reference in New Issue
Block a user