1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 16:41:04 +00:00

Support to deactivate sparsemem or mmap globally for Dynamips VMs.

This commit is contained in:
grossmj 2015-02-28 15:53:21 -07:00
parent d762c43314
commit 7fe2d6c367

View File

@ -496,6 +496,14 @@ class Dynamips(BaseManager):
if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]: if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]:
yield from vm.uninstall_wic(wic_slot_id) yield from vm.uninstall_wic(wic_slot_id)
mmap_support = self.config.get_section_config("Dynamips").getboolean("mmap_support", True)
if mmap_support is False:
yield from vm.set_mmap(False)
sparse_memory_support = self.config.get_section_config("Dynamips").getboolean("sparse_memory_support", True)
if sparse_memory_support is False:
yield from vm.set_sparsemem(False)
# update the configs if needed # update the configs if needed
yield from self.create_vm_configs(vm, settings.get("startup_config_content"), settings.get("private_config_content")) yield from self.create_vm_configs(vm, settings.get("startup_config_content"), settings.get("private_config_content"))