From fe3d0d891294a9d2e64f48e5b1de1427ca49abf3 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Thu, 21 Jul 2011 15:11:42 +0200 Subject: fix enables two vms running parallel --- src/os-plugins/plugins/vmchooser/files/run-virt.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/os-plugins/plugins/vmchooser/files/run-virt.sh') diff --git a/src/os-plugins/plugins/vmchooser/files/run-virt.sh b/src/os-plugins/plugins/vmchooser/files/run-virt.sh index f796271d..bf62b404 100644 --- a/src/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/src/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -283,6 +283,8 @@ writelog "\tVM short name:\t\t$vm_shortname" # VM-ID static (00) VM_ID="00" +# take last two digits of current pid... +VM_ID=$(expr substr $$ $(expr ${#$} - 1) 2) # Make sure cpu_cores is not empty cpu_cores=${cpu_cores:-"1"} @@ -290,6 +292,9 @@ cpu_cores=${cpu_cores:-"1"} # Total amount of memory defined in stage 3 # TODO: Should be dependent on the setup (if diff is written to RAM ...) permem=60 +if [ "x${VMCHOOSER_FORCE_HALF_MEM}" == "x1" ]; then + permem=30 +fi # Get a result which can be divided through 4 mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) if [ -n "${mainvirtmem}" ]; then -- cgit v1.2.3-55-g7522