0c6c31977f
f38c56c9-add-support-for-SMM-feature.patch 24f9d053-add-support-for-loader-secure-attribute.patch 4f8e795c-if-required-by-UEFI-enable-SMM-feature-and-set-q35-machine-type.patch - bsc#1027942 - virt-manager: Missing upstream bug fixes 93085d2b-reset-guest-domain-to-none-on-domain-creation-error.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=352
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
Subject: guest: Don't repeatedly overwrite self.domain
|
|
From: Cole Robinson crobinso@redhat.com Thu Apr 13 14:56:03 2017 -0400
|
|
Date: Thu Apr 13 14:56:03 2017 -0400:
|
|
Git: 93085d2b9d4a3dd6cbb9edfeae9b6cefee9419c1
|
|
|
|
Since clearing it is important, just set it at the end when things
|
|
have succeeded
|
|
|
|
diff --git a/virtinst/guest.py b/virtinst/guest.py
|
|
index 39975199..6bdfe170 100644
|
|
--- a/virtinst/guest.py
|
|
+++ b/virtinst/guest.py
|
|
@@ -394,28 +394,28 @@ class Guest(XMLBuilder):
|
|
meter.start(size=None, text=meter_label)
|
|
|
|
if transient:
|
|
- self.domain = self.conn.createXML(install_xml or final_xml, 0)
|
|
+ domain = self.conn.createXML(install_xml or final_xml, 0)
|
|
else:
|
|
# Not all hypervisors (vz) support createXML, so avoid it here
|
|
- self.domain = self.conn.defineXML(install_xml or final_xml)
|
|
+ domain = self.conn.defineXML(install_xml or final_xml)
|
|
|
|
# Handle undefining the VM if the initial startup fails
|
|
if doboot or self.installer.has_install_phase():
|
|
try:
|
|
- self.domain.create()
|
|
+ domain.create()
|
|
except:
|
|
import sys
|
|
exc_info = sys.exc_info()
|
|
try:
|
|
- self.domain.undefine()
|
|
- self.domain = None
|
|
+ domain.undefine()
|
|
except:
|
|
pass
|
|
raise exc_info[0], exc_info[1], exc_info[2]
|
|
|
|
if install_xml and install_xml != final_xml:
|
|
- self.domain = self.conn.defineXML(final_xml)
|
|
+ domain = self.conn.defineXML(final_xml)
|
|
|
|
+ self.domain = domain
|
|
try:
|
|
logging.debug("XML fetched from libvirt object:\n%s",
|
|
self.domain.XMLDesc(0))
|