1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Catch error when qemuy can't connect to his console

Fix #803
This commit is contained in:
Julien Duponchelle 2016-11-28 13:18:04 +01:00
parent b3d83b1b0b
commit 2b15da3d19
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -852,8 +852,6 @@ class QemuVM(BaseNode):
yield from self.resume() yield from self.resume()
return return
else:
if self._manager.config.get_section_config("Qemu").getboolean("monitor", True): if self._manager.config.get_section_config("Qemu").getboolean("monitor", True):
try: try:
info = socket.getaddrinfo(self._monitor_host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE) info = socket.getaddrinfo(self._monitor_host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
@ -908,7 +906,10 @@ class QemuVM(BaseNode):
if "-enable-kvm" in command_string: if "-enable-kvm" in command_string:
self._hw_virtualization = True self._hw_virtualization = True
try:
yield from self.start_wrap_console() yield from self.start_wrap_console()
except OSError as e:
raise QemuError("Could not start QEMU console {}\n".format(e))
def _termination_callback(self, returncode): def _termination_callback(self, returncode):
""" """