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()
return
else:
if self._manager.config.get_section_config("Qemu").getboolean("monitor", True):
try:
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:
self._hw_virtualization = True
try:
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):
"""