From 76b357c1ce99e09d89840817ce51a750519a3406 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 26 Aug 2014 17:07:48 -0600 Subject: [PATCH] Do not activate sparse memory by default for c1700 and c2600 platforms. https://github.com/GNS3/dynamips/issues/54 --- gns3server/modules/dynamips/backends/vm.py | 3 ++- gns3server/modules/dynamips/nodes/c1700.py | 4 +++- gns3server/modules/dynamips/nodes/c2600.py | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/dynamips/backends/vm.py b/gns3server/modules/dynamips/backends/vm.py index 1da7e50c6..6a4716205 100644 --- a/gns3server/modules/dynamips/backends/vm.py +++ b/gns3server/modules/dynamips/backends/vm.py @@ -158,7 +158,8 @@ def vm_create(self, request): router = PLATFORMS[platform](hypervisor, name, router_id) router.ram = ram router.image = image - router.sparsemem = self._hypervisor_manager.sparse_memory_support + if platform not in ("c1700", "c2600"): + router.sparsemem = self._hypervisor_manager.sparse_memory_support router.mmap = self._hypervisor_manager.mmap_support if "console" in request: router.console = request["console"] diff --git a/gns3server/modules/dynamips/nodes/c1700.py b/gns3server/modules/dynamips/nodes/c1700.py index 0d59f616e..241601a24 100644 --- a/gns3server/modules/dynamips/nodes/c1700.py +++ b/gns3server/modules/dynamips/nodes/c1700.py @@ -51,6 +51,7 @@ def __init__(self, hypervisor, name, router_id=None, chassis="1720"): self._chassis = chassis self._iomem = 15 # percentage self._clock_divisor = 8 + self._sparsemem = False if chassis != "1720": self.chassis = chassis @@ -72,7 +73,8 @@ def defaults(self): "disk1": self._disk1, "chassis": self._chassis, "iomem": self._iomem, - "clock_divisor": self._clock_divisor} + "clock_divisor": self._clock_divisor, + "sparsemem": self._sparsemem} # update the router defaults with the platform specific defaults router_defaults.update(platform_defaults) diff --git a/gns3server/modules/dynamips/nodes/c2600.py b/gns3server/modules/dynamips/nodes/c2600.py index 155fbf2f3..568662359 100644 --- a/gns3server/modules/dynamips/nodes/c2600.py +++ b/gns3server/modules/dynamips/nodes/c2600.py @@ -66,6 +66,7 @@ def __init__(self, hypervisor, name, router_id=None, chassis="2610"): self._chassis = chassis self._iomem = 15 # percentage self._clock_divisor = 8 + self._sparsemem = False if chassis != "2610": self.chassis = chassis @@ -87,7 +88,8 @@ def defaults(self): "disk1": self._disk1, "iomem": self._iomem, "chassis": self._chassis, - "clock_divisor": self._clock_divisor} + "clock_divisor": self._clock_divisor, + "sparsemem": self._sparsemem} # update the router defaults with the platform specific defaults router_defaults.update(platform_defaults)