From e6cbc5d31129f9d6e2a3bf98be92cccb26fd05d4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 17 Jan 2023 17:45:53 +0100 Subject: [vmware-common/run-virt] Subtract more RAM for larger VRAM --- .../run-virt-includes/set_runvirt_hardware_variables.inc | 2 +- .../openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc index f6d50fca..918a767f 100644 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/set_runvirt_hardware_variables.inc @@ -48,7 +48,7 @@ set_virt_memory() { reserve=18 else max=2000 - reserve=9 + reserve=10 fi fi # Non-zram swap (KB) diff --git a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc index 7c5c40e1..6a1b0a34 100644 --- a/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc +++ b/core/modules/vmware-common/data/opt/openslx/vmchooser/plugins/vmware/includes/write_final_vmx.inc @@ -271,14 +271,14 @@ setup_graphics() { vram=$( < "${TMPCONFIG}" grep -m1 -i '^svga\.graphicsMemoryKB' \ | sed -r 's/^[^=]+//;s/^(\s|=|")*//;s/(\s|")+$//' ) existing="$vram" - if [ -z "$vram" ]; then # Nothing, default to half of max - vram="$(( max_vram / 2 ))" + if [ -z "$vram" ]; then # Nothing, default to third of max + vram="$(( max_vram / 3 ))" elif (( vram > max_vram )); then # Explicitly set, cap if too excessive vram="$max_vram" fi (( vram < 131072 )) && vram=131072 - # Subtract a querter of VRAM from main RAM to be safe - VM_MEM="$(( VM_MEM - ( (vram / 4096) / 4 ) * 4 ))" + # Subtract half of VRAM from main RAM to be safe + VM_MEM="$(( VM_MEM - ( (vram / 2048) / 4 ) * 4 ))" if [ -z "$existing" ]; then echo 'svga.graphicsMemoryKB = "'"$vram"'"' >> "${TMPCONFIG}" else -- cgit v1.2.3-55-g7522