mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
1 parent
ccd3224490
commit
e8805d3fdc
3 files changed
+52
No files matched your search
@@ -704,6 +704,7 @@ class QemuVM(BaseVM):
|
||||
self._stdout_file = os.path.join(self.working_dir, "qemu.log")
|
||||
log.info("logging to {}".format(self._stdout_file))
|
||||
with open(self._stdout_file, "w", encoding="utf-8") as fd:
|
||||
fd.write("Start QEMU with {}\n\nExecution log:\n".format(command_string))
|
||||
self._process = yield from asyncio.create_subprocess_exec(*self._command,
|
||||
stdout=fd,
|
||||
stderr=subprocess.STDOUT,
|
||||
@@ -732,6 +733,8 @@ class QemuVM(BaseVM):
|
||||
log.info("QEMU process has stopped, return code: %d", returncode)
|
||||
self.status = "stopped"
|
||||
self._process = None
|
||||
if returncode != 0:
|
||||
self.project.emit("log.error", "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout()))
|
||||
|
||||
@asyncio.coroutine
|
||||
def stop(self):
|
||||
|
||||
Reference in new issue
Block a user