summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/virtualbox/files/run-virt.include
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/virtualbox/files/run-virt.include
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/virtualbox/files/run-virt.include')
-rw-r--r--os-plugins/plugins/virtualbox/files/run-virt.include76
1 files changed, 38 insertions, 38 deletions
diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include
index a4b3454b..53120f2c 100644
--- a/os-plugins/plugins/virtualbox/files/run-virt.include
+++ b/os-plugins/plugins/virtualbox/files/run-virt.include
@@ -162,44 +162,44 @@ fi
# TODO: MEM muss noch angepasst werden. Maschine crasht wenn nehr als 50% MEM
# memory part equal to vmware plugin
# percentage of memory to use for virtualbox in standard case
-if [ -n "${forcemem}" ]; then
- mem="${forcemem}"
-else
- permem=30
- if [ "${totalmem}" -ge "1600" ]; then
- permem=40
- fi
- # check if /tmp is on harddisk
- if grep -qe "/dev/.* /tmp " /proc/mounts ; then
- permem=60
- id44="1"
- # Hack, if more than 2,5G RAM use 40% of Ram and write vmem into Ram as well
- # (40% vmware | 40% confdir(vmem...) | 20% host
- # VMplayer 2+ issue
- # TODO: makes this sense for vbox?
- #if [ "${totalmem}" -ge "2500" ]; then
- #permem=40
- #rmdir ${snapshotdir}
- #snapshotdirold=${snapshotdir}
- #snapshotdir=/dev/shm/${self}/${USER}/${VM_ID}
- #mkdir -p ${snapshotdir}
- #ln -sf ${snapshotdir} ${snapshotdirold}
- #fi
- fi
- mem=$(expr ${totalmem} / 100 \* ${permem})
- if [ "${id44}" = "1" ]; then
- hostmem=$(expr ${totalmem} - ${mem})
- else
- hostmem=$(expr ${totalmem} - ${mem} - ${mem})
- fi
- #permem=40
- #mem=$(expr ${totalmem} * ${permem})
- if [ "${mem}" -lt "256" ] || [ "${hostmem}" -lt "256" ]; then
- writelog "Memory out of range: ${mem} MB (guest) / ${hostmem} MB (host)!"
- writelog "Min. 256 MB for host and guest!"
- cleanexit 1
- fi
-fi
+#if [ -n "${forcemem}" ]; then
+# mem="${forcemem}"
+#else
+# permem=30
+# if [ "${totalmem}" -ge "1600" ]; then
+# permem=40
+# fi
+# # check if /tmp is on harddisk
+# if grep -qe "/dev/.* /tmp " /proc/mounts ; then
+# permem=60
+# id44="1"
+# # Hack, if more than 2,5G RAM use 40% of Ram and write vmem into Ram as well
+# # (40% vmware | 40% confdir(vmem...) | 20% host
+# # VMplayer 2+ issue
+# # TODO: makes this sense for vbox?
+# #if [ "${totalmem}" -ge "2500" ]; then
+# #permem=40
+# #rmdir ${snapshotdir}
+# #snapshotdirold=${snapshotdir}
+# #snapshotdir=/dev/shm/${self}/${USER}/${VM_ID}
+# #mkdir -p ${snapshotdir}
+# #ln -sf ${snapshotdir} ${snapshotdirold}
+# #fi
+# fi
+# mem=$(expr ${totalmem} / 100 \* ${permem})
+# if [ "${id44}" = "1" ]; then
+# hostmem=$(expr ${totalmem} - ${mem})
+# else
+# hostmem=$(expr ${totalmem} - ${mem} - ${mem})
+# fi
+# #permem=40
+# #mem=$(expr ${totalmem} * ${permem})
+# if [ "${mem}" -lt "256" ] || [ "${hostmem}" -lt "256" ]; then
+# writelog "Memory out of range: ${mem} MB (guest) / ${hostmem} MB (host)!"
+# writelog "Min. 256 MB for host and guest!"
+# cleanexit 1
+# fi
+#fi
# translate network cards
case "${network_card}" in