[virt-tools-list] [virt-manager PATCH] create: skip continue-install restart if user destroys VM

Pavel Hrdina phrdina at redhat.com
Fri May 13 15:46:27 UTC 2016


Commit 159e4af1 fixed a case where VM was started if user destroyed VM
while installing it.  This moves the code before we check whether we
need to restart the VM in order to continue in installation (windows
requires that).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1235238

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 virtManager/create.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/virtManager/create.py b/virtManager/create.py
index eee7391..df92709 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -2326,6 +2326,11 @@ class vmmCreate(vmmGObjectUI):
         if not vm.is_shutoff():
             return
 
+        if vm.get_install_abort():
+            logging.debug("User manually shutdown VM, not restarting "
+                          "guest after install.")
+            return True
+
         try:
             if virtinst_guest:
                 continue_inst = virtinst_guest.get_continue_inst()
@@ -2341,11 +2346,6 @@ class vmmCreate(vmmGObjectUI):
                                        self._check_install_status, None)
                     return True
 
-            if vm.get_install_abort():
-                logging.debug("User manually shutdown VM, not restarting "
-                              "guest after install.")
-                return True
-
             logging.debug("Install should be completed, starting VM.")
             vm.startup()
         except Exception, e:
-- 
2.8.2




More information about the virt-tools-list mailing list