Skip to content

Commit

Permalink
Merge pull request #1256 from jkonecny12/master-do-not-supress-virt-i…
Browse files Browse the repository at this point in the history
…nstall-errors

Show stdout and stderr when virt-install fails
  • Loading branch information
jkonecny12 authored Jul 18, 2024
2 parents 489a8cb + 385e45c commit d60441a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/launcher/lib/virtual_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ def _start_vm(self, args):
try:
execWithRedirect("virt-install", args, raise_err=True)
except subprocess.CalledProcessError as e:
raise InstallError("Problem starting virtual install: %s" % e) from e
stdout = e.stdout.strip() if e.stdout else ""
stderr = e.stderr.strip() if e.stderr else ""
raise InstallError("""
Problem starting virtual install: %s
stdout: %s
stderr: %s""" % (e, stdout, stderr)
) from e

conn = libvirt.openReadOnly(None)
dom = conn.lookupByName(self._virt_name)
Expand Down

0 comments on commit d60441a

Please sign in to comment.