mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-12 09:18:00 +03:00
domain: If VM has nvram, ask libvirt to remove it on undefine
This commit is contained in:
parent
052220cfc8
commit
ead9d3f56d
@ -1373,6 +1373,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
flags |= getattr(libvirt,
|
flags |= getattr(libvirt,
|
||||||
"VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA", 0)
|
"VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA", 0)
|
||||||
flags |= getattr(libvirt, "VIR_DOMAIN_UNDEFINE_MANAGED_SAVE", 0)
|
flags |= getattr(libvirt, "VIR_DOMAIN_UNDEFINE_MANAGED_SAVE", 0)
|
||||||
|
if self.get_xmlobj().os.nvram:
|
||||||
|
flags |= getattr(libvirt, "VIR_DOMAIN_UNDEFINE_NVRAM", 0)
|
||||||
try:
|
try:
|
||||||
self._backend.undefineFlags(flags)
|
self._backend.undefineFlags(flags)
|
||||||
except libvirt.libvirtError:
|
except libvirt.libvirtError:
|
||||||
|
Loading…
Reference in New Issue
Block a user