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:
parent
d762c43314
commit
7fe2d6c367
@ -496,6 +496,14 @@ class Dynamips(BaseManager):
|
||||
if vm.slots[0].wics and vm.slots[0].wics[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
|
||||
yield from self.create_vm_configs(vm, settings.get("startup_config_content"), settings.get("private_config_content"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user