Skip to content
Snippets Groups Projects
Commit a2d45f68 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

windows: Show details if the VM dies unexpectedly

Display the return code and the stderr of the kvm process when the
customization VM dies unexpectendly
parent 0dd1b213
No related branches found
No related tags found
No related merge requests found
......@@ -138,7 +138,8 @@ class VM(object):
args.extend(['-monitor', 'stdio'])
self.process = subprocess.Popen(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
def stop(self, timeout=0, fatal=True):
"""Stop the VM"""
......@@ -184,7 +185,9 @@ class VM(object):
if current == self._ntokens:
return True
if not self.isalive():
raise FatalError("Windows VM died unexpectedly!")
(stdout, stderr, rc) = self.wait()
raise FatalError("Windows VM died unexpectedly!\n\n"
"(rc=%d)\n%s" % (rc, stderr))
return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment