From 6bec5474db0cb82ff8f0299febcbf302729553a5 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 22 Dec 2019 18:03:19 -0500 Subject: [PATCH] virt-install: Check --transient status in domain --wait Otherwise when the VM shuts down, we will report an error, because the VM doesn't exist anymore. The check_domain_inactive() helper already handles this case, we just weren't using it in the --wait loop. https://bugzilla.redhat.com/show_bug.cgi?id=1785643 Signed-off-by: Cole Robinson --- virt-install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/virt-install b/virt-install index b6f0a2eef..e5fbe050b 100755 --- a/virt-install +++ b/virt-install @@ -727,7 +727,6 @@ def check_domain(installer, domain, conscb, transient, waithandler): try: dominfo = domain.info() state = dominfo[0] - log.debug("Domain state after install: %s", state) if state == libvirt.VIR_DOMAIN_CRASHED: fail(_("Domain has crashed.")) # pragma: no cover @@ -769,7 +768,7 @@ def check_domain(installer, domain, conscb, transient, waithandler): # Wait loop while True: - if not domain.isActive(): # pragma: no cover + if check_domain_inactive(): print_stdout(_("Domain has shutdown. Continuing.")) break