mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
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>
This commit is contained in:
parent
d52c9d1ffa
commit
6bec5474db
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user