From b025bef08737dc30a4e776b510837a83984bd571 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 12 Jul 2013 18:56:55 +0200 Subject: [vmplayer] More updates to hw-config setup --- .../data/etc/openslx/vmware/run-virt.include | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include index 6c062c09..1178ca2f 100644 --- a/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include +++ b/remote/modules/vmplayer/data/etc/openslx/vmware/run-virt.include @@ -34,6 +34,7 @@ runvmwareconfheader () echo "# This configuration file was generated by $0" > "$conffile" MAXMEM="9999999" + MAXCORES="256" # check for the ostype # 1) memory limits @@ -128,27 +129,27 @@ runvmwareconfheader () shfolders="FALSE" case "$vmostype" in win31) - cpu_cores="1" + MAXCORES="1" sound="sb16" ;; winnt) - cpu_cores="2" + MAXCORES="2" sound="sb16" ;; win95|win98|winme) - cpu_cores="1" + MAXCORES="1" ;; win2000pro) # Don't know if Win 2000 supports shared folders, disabled to be safe - cpu_cores="2" + MAXCORES="2" ;; win2000serv) - cpu_cores="4" + MAXCORES="4" ;; win2000advserv) - cpu_cores="8" + MAXCORES="8" ;; winxphome) - cpu_cores="1" + MAXCORES="1" shfolders="TRUE" ;; winxp*|winvista*|windows7*) @@ -161,11 +162,11 @@ runvmwareconfheader () shfolders="TRUE" ;; macos*64) - cpu_cores="2" + MAXCORES="2" vmostype="freebsd-64" ;; macos*) - cpu_cores="1" + MAXCORES="1" vmostype="freebsd" ;; beos*) @@ -181,9 +182,12 @@ runvmwareconfheader () esac svga_autodetect="TRUE" - - numvcpus="${cpu_cores}" - [ "${cpu_cores}" -ge "4" 2>/dev/null ] && numvcpus="4" + + real_core_count="$cpu_cores" + [ "$cpu_cores" -gt "$MAXCORES" ] && cpu_cores="$MAXCORES" + # It currently makes no sense to set the virtual number of cores + # to a different value than the virtual number of cores per virtual CPU. + cores_per_socket="$cpu_cores" if [ "x$shfolders" != "xFALSE" ]; then ENABLE_SHARE='sharedFolder.option = "alwaysEnabled"' @@ -204,9 +208,6 @@ ehci.present = "TRUE" $FORCE3D mks.enable3d = "$enable3d" -# version specific stuff - ver. 3.*|7.* -cpuid.coresPerSocket = "$cpu_cores" -maxvcpus = "4" monitor.virtual_mmu = "automatic" monitor.virtual_exec = "automatic" floppy1.clientDevice = "FALSE" @@ -218,7 +219,9 @@ displayName = "$displayname" guestOS = "$vmostype" # CPU/MEM -numvcpus = "$numvcpus" +numvcpus = "$cpu_cores" +cpuid.coresPerSocket = "$cores_per_socket" +maxvcpus = "$real_core_count" memsize = "$mem" MemAllowAutoScaleDown = "FALSE" MemTrimRate = "-1" -- cgit v1.2.3-55-g7522