mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge 2.1 into 2.2
This commit is contained in:
commit
80eb06f67c
4 files changed
+25
-4
No files matched your search
@@ -1013,7 +1013,7 @@ class QemuVM(BaseNode):
|
||||
|
||||
if self.on_close == "shutdown_signal":
|
||||
await self._control_vm("system_powerdown")
|
||||
await gns3server.utils.asyncio.wait_for_process_termination(self._process, timeout=30)
|
||||
await gns3server.utils.asyncio.wait_for_process_termination(self._process, timeout=120)
|
||||
else:
|
||||
self._process.terminate()
|
||||
await gns3server.utils.asyncio.wait_for_process_termination(self._process, timeout=3)
|
||||
|
||||
@@ -73,11 +73,12 @@ class VMwareGNS3VM(BaseGNS3VM):
|
||||
if vcpus > available_vcpus:
|
||||
raise GNS3VMError("You have allocated too many vCPUs for the GNS3 VM! (max available is {} vCPUs)".format(available_vcpus))
|
||||
|
||||
cores_per_sockets = int(available_vcpus / psutil.cpu_count(logical=False))
|
||||
try:
|
||||
pairs = VMware.parse_vmware_file(self._vmx_path)
|
||||
pairs["numvcpus"] = str(vcpus)
|
||||
pairs["cpuid.coresPerSocket"] = str(cores_per_sockets)
|
||||
cores_per_sockets = int(available_vcpus / psutil.cpu_count(logical=False))
|
||||
if cores_per_sockets >= 1:
|
||||
pairs["cpuid.corespersocket"] = str(cores_per_sockets)
|
||||
pairs["memsize"] = str(ram)
|
||||
VMware.write_vmx_file(self._vmx_path, pairs)
|
||||
log.info("GNS3 VM vCPU count set to {} and RAM amount set to {}".format(vcpus, ram))
|
||||
|
||||
Reference in new issue
Block a user