diff options
Diffstat (limited to 'os-plugins/plugins/vmchooser')
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index a644ea5b..23f026c7 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -283,10 +283,14 @@ VM_ID="00" cpu_cores=${cpu_cores:-"1"} # total amount of memory defined in stage 3 -permem=60 +permem=50 # get a result which can be divided through 4 mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) -[ -n "${mainvirtmem}" ] && forcemem=$(expr ${mainvirtmem} / 4 \* 4) +if [ -n "${mainvirtmem}" ]; then + forcemem=$(expr ${mainvirtmem} / 4 \* 4) + mem=${forcemem} +fi +hostmem=$(expr ${totalmem} - ${mem}) # configuring ethernet mac address: first 3 bytes are fixed (00:50:56) # 4th byte is the VM-ID (0D) |