1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 06:18:08 +00:00

Count logical CPUs to detect if the number of vCPUs is too high when configuring the GNS3 VM. Fixes #2688.

This commit is contained in:
grossmj 2019-02-17 23:07:33 +08:00
parent 174624121d
commit 84ee3263ba

View File

@ -72,7 +72,7 @@ class VMwareGNS3VM(BaseGNS3VM):
if ram % 4 != 0:
raise GNS3VMError("Allocated memory {} for the GNS3 VM must be a multiple of 4".format(ram))
available_vcpus = psutil.cpu_count(logical=False)
available_vcpus = psutil.cpu_count()
if vcpus > available_vcpus:
raise GNS3VMError("You have allocated too many vCPUs for the GNS3 VM! (max available is {} vCPUs)".format(available_vcpus))