summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser/files/run-virt.sh
diff options
context:
space:
mode:
authorMichael Janczyk2010-08-22 23:03:48 +0200
committerMichael Janczyk2010-08-22 23:03:48 +0200
commit19ec30d3e2e52d87ddde96c8ee9b99224aaa8586 (patch)
tree46eaf198e882d473fe1f3a7d424ade08b4935de1 /os-plugins/plugins/vmchooser/files/run-virt.sh
parentMerge branch 'master' of openslx.org:openslx/core (diff)
downloadcore-19ec30d3e2e52d87ddde96c8ee9b99224aaa8586.tar.gz
core-19ec30d3e2e52d87ddde96c8ee9b99224aaa8586.tar.xz
core-19ec30d3e2e52d87ddde96c8ee9b99224aaa8586.zip
changed to 50% ram for vbox and vmware
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r--os-plugins/plugins/vmchooser/files/run-virt.sh8
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)