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
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
Subject: Reset Guest.domain to None on domain creation error
|
|
From: Christophe Fergeau cfergeau@redhat.com Thu Apr 13 11:18:46 2017 +0200
|
|
Date: Thu Apr 13 14:24:40 2017 -0400:
|
|
Git: 2099a1946e22b62d31b954dc3e7b813404c2d019
|
|
|
|
When an error occurs when the VM creation wizard tries to start the VM,
|
|
it's then not possible to press again the "Finish" button to try again
|
|
to start it, as this errors out with:
|
|
|
|
Traceback (most recent call last):
|
|
File "/home/teuf/redhat/virt/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
|
|
callback(asyncjob, *args, **kwargs)
|
|
File "/home/teuf/redhat/virt/virt-manager/virtManager/create.py", line 2341, in _do_async_install
|
|
guest.start_install(meter=meter)
|
|
File "/home/teuf/redhat/virt/virt-manager/virtinst/guest.py", line 457, in start_install
|
|
raise RuntimeError(_("Domain has already been started!"))
|
|
RuntimeError: Domain has already been started!
|
|
|
|
This is caused by code introduced in commit fc6778 which does not reset
|
|
self.domain to None when an exception is caught.
|
|
|
|
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
Index: virt-manager-1.4.1/virtinst/guest.py
|
|
===================================================================
|
|
--- virt-manager-1.4.1.orig/virtinst/guest.py
|
|
+++ virt-manager-1.4.1/virtinst/guest.py
|
|
@@ -408,6 +408,7 @@ class Guest(XMLBuilder):
|
|
exc_info = sys.exc_info()
|
|
try:
|
|
self.domain.undefine()
|
|
+ self.domain = None
|
|
except:
|
|
pass
|
|
raise exc_info[0], exc_info[1], exc_info[2]
|