From 718a68bf8060c17c602d73085bc5b2ca3a643c26 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 4 May 2018 16:38:17 +0200 Subject: [*virt*] fix vmware VM only having 1 core... --- .../plugins/virtualbox/includes/guest_hardware_limits.inc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core/modules/vbox-src/data') diff --git a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc index 44640710..d29fac20 100755 --- a/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc +++ b/core/modules/vbox-src/data/opt/openslx/vmchooser/plugins/virtualbox/includes/guest_hardware_limits.inc @@ -104,13 +104,9 @@ set_hardware_limits() { # TODO: FreeBSD, NetBSD, MacOS*, Solaris, Oracle, ... esac - # check /run/hwinfo for CORE not THREADS - # vbox seems to only want maximum cores = number of - # physical cores of the cpu, so use that - if [ -e /run/hwinfo ]; then - . /run/hwinfo - notempty HW_CORES && CPU_CORES="$HW_CORES" - fi + # use HW_CORES not HW_THREADS since virtualbox does not + # seem to handle hyperthreading all too well... + declare -g CPU_CORES="${HW_CORES:-1}" [ "${CPU_CORES}" -gt "{MAXCORES}" ] && CPU_CORES="${MAXCORES}" [ "${VM_MEM}" -gt "${MAXMEM}" ] && VM_MEM="${MAXMEM}" -- cgit v1.2.3-55-g7522