From f628c3e266c4e4326bf844e774ad31b96e97d645 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Fri, 13 May 2016 17:28:03 +0200 Subject: [PATCH] create: skip continue-install restart if user destroys VM 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 --- virtManager/create.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virtManager/create.py b/virtManager/create.py index eee739195..df92709b9 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: