virt-manager/SOURCES/virt-manager-domain-Fix-VM-...

41 lines
1.5 KiB
Diff

From b17d858ccca69ed09fec0a254e133210fef08e17 Mon Sep 17 00:00:00 2001
Message-Id: <b17d858ccca69ed09fec0a254e133210fef08e17@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Tue, 8 Sep 2020 15:15:14 -0400
Subject: [PATCH] domain: Fix VM deletion with firmare='efi'
From: Cole Robinson <crobinso@redhat.com>
Our check for nvram was not complete for that case
https://bugzilla.redhat.com/show_bug.cgi?id=1869135
Signed-off-by: Cole Robinson <crobinso@redhat.com>
(cherry picked from commit 38cd19b0c31788cb5e6d16cfa122d52a8c7f630d)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
virtManager/object/domain.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py
index f61f0f53..e83f1b11 100644
--- a/virtManager/object/domain.py
+++ b/virtManager/object/domain.py
@@ -271,9 +271,10 @@ class vmmDomain(vmmLibvirtObject):
return str(i)
def has_nvram(self):
- return bool(self.get_xmlobj().os.loader_ro is True and
- self.get_xmlobj().os.loader_type == "pflash" and
- self.get_xmlobj().os.nvram)
+ return bool(self.get_xmlobj().os.firmware == 'efi' or
+ (self.get_xmlobj().os.loader_ro is True and
+ self.get_xmlobj().os.loader_type == "pflash" and
+ self.get_xmlobj().os.nvram))
def is_persistent(self):
return bool(self._backend.isPersistent())
--
2.26.2