From 2ce01fafc08e566a5a5063a9bacf3dd9cb8b8806 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 10 Aug 2015 21:22:21 -0600 Subject: [PATCH 1/3] Don't delete Dynamips ROM files. They are used to restore the nvram. --- gns3server/modules/dynamips/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index 27431659..c8b3d953 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -174,7 +174,6 @@ class Dynamips(BaseManager): files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_rommon_vars")) files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_ssa")) files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_log.txt")) - files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_rom")) files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_i[0-9]*_bootflash")) for file in files: try: From 83a7e253895a0186974f023bb6308f287b913f04 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 13 Aug 2015 20:15:50 -0600 Subject: [PATCH 2/3] Fixes Unicode error. Fixes #290. --- gns3server/modules/dynamips/dynamips_hypervisor.py | 2 +- gns3server/modules/dynamips/nodes/router.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/dynamips/dynamips_hypervisor.py b/gns3server/modules/dynamips/dynamips_hypervisor.py index f4ef1de9..6943c862 100644 --- a/gns3server/modules/dynamips/dynamips_hypervisor.py +++ b/gns3server/modules/dynamips/dynamips_hypervisor.py @@ -285,7 +285,7 @@ class DynamipsHypervisor: if not chunk: raise DynamipsError("No data returned from {host}:{port}, Dynamips process running: {run}" .format(host=self._host, port=self._port, run=self.is_running())) - buf += chunk.decode("utf-8") + buf += chunk.decode("utf-8", errors="ignore") except OSError as e: raise DynamipsError("Lost communication with {host}:{port} :{error}, Dynamips process running: {run}" .format(host=self._host, port=self._port, error=e, run=self.is_running())) diff --git a/gns3server/modules/dynamips/nodes/router.py b/gns3server/modules/dynamips/nodes/router.py index 07bdba6e..5d8331e3 100644 --- a/gns3server/modules/dynamips/nodes/router.py +++ b/gns3server/modules/dynamips/nodes/router.py @@ -353,6 +353,7 @@ class Router(BaseVM): files += glob.glob(os.path.join(project_dir, "{}_i{}_slot[0-1]".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_nvram".format(self.platform, self.dynamips_id))) files += glob.glob(os.path.join(project_dir, "{}_i{}_flash[0-1]".format(self.platform, self.dynamips_id))) + files += glob.glob(os.path.join(project_dir, "{}_i{}_rom".format(self.platform, self.dynamips_id))) for file in files: try: log.debug("Deleting file {}".format(file)) From eb5f9c48f27a2025cbcc4ca0726e63e1649c4e11 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 14 Aug 2015 22:16:02 -0600 Subject: [PATCH 3/3] Backport: fixes NAT NIO for Qemu VMs (do not launch any legacy scripts) --- gns3server/modules/qemu/qemu_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/modules/qemu/qemu_vm.py b/gns3server/modules/qemu/qemu_vm.py index 73c18d2e..795a3969 100644 --- a/gns3server/modules/qemu/qemu_vm.py +++ b/gns3server/modules/qemu/qemu_vm.py @@ -1019,7 +1019,7 @@ class QemuVM(BaseVM): self._host, nio.lport)]) elif isinstance(nio, NIOTAP): - network_options.extend(["-netdev", "tap,id=gns3-{},ifname={}".format(adapter_number, nio.tap_device)]) + network_options.extend(["-netdev", "tap,id=gns3-{},ifname={},script=no,downscript=no".format(adapter_number, nio.tap_device)]) elif isinstance(nio, NIONAT): network_options.extend(["-netdev", "user,id=gns3-{}".format(adapter_number)]) else: