summaryrefslogtreecommitdiff
path: root/virt-install
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2019-12-22 18:03:19 -0500
committerCole Robinson <crobinso@redhat.com>2019-12-22 18:03:19 -0500
commit6bec5474db0cb82ff8f0299febcbf302729553a5 (patch)
treeeefb0a64cb266e77fb6ed7b6c354f17438f74c28 /virt-install
parentd52c9d1ffa2d8c204fbb2a714f89b007fa6227ec (diff)
downloadvirt-manager-6bec5474db0cb82ff8f0299febcbf302729553a5.tar.gz
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 <crobinso@redhat.com>
Diffstat (limited to 'virt-install')
-rwxr-xr-xvirt-install3
1 files changed, 1 insertions, 2 deletions
diff --git a/virt-install b/virt-install
index b6f0a2ee..e5fbe050 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