From 3a1ba8f42d51469b6ae669a278afb7644b5794a9 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 7 Dec 2017 12:02:41 -0600 Subject: [PATCH] Fix issue with Qemu + SPICE when IPv4 is not enabled. --- gns3server/compute/qemu/qemu_vm.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index 74ea2dc6..367dbcbc 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -1342,8 +1342,14 @@ class QemuVM(BaseNode): def _spice_options(self): if self._console: + console_host = self._manager.port_manager.console_host + if console_host == "0.0.0.0" and socket.has_ipv6: + # to fix an issue with Qemu when IPv4 is not enabled + # see https://github.com/GNS3/gns3-gui/issues/2352 + # FIXME: consider making this more global (not just for Qemu + SPICE) + console_host = "::" return ["-spice", - "addr={},port={},disable-ticketing".format(self._manager.port_manager.console_host, self._console), + "addr={},port={},disable-ticketing".format(console_host, self._console), "-vga", "qxl"] else: return []