From 95bede708325b3af6f299fa72232eabd24531f81 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 17 Sep 2014 18:33:30 -0400 Subject: [PATCH 09/12] domain: If VM has nvram, ask libvirt to remove it on undefine Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1111986 (cherry picked from commit ead9d3f56dfb32411dac586e6d43dca23d2377f0) --- virtManager/domain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtManager/domain.py b/virtManager/domain.py index f28bad2..2806872 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -1372,6 +1372,8 @@ class vmmDomain(vmmLibvirtObject): flags |= getattr(libvirt, "VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA", 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: self._backend.undefineFlags(flags) except libvirt.libvirtError: -- 1.9.3