From 19ec30d3e2e52d87ddde96c8ee9b99224aaa8586 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Sun, 22 Aug 2010 23:03:48 +0200 Subject: changed to 50% ram for vbox and vmware --- .../plugins/virtualbox/files/run-virt.include | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'os-plugins/plugins/virtualbox/files/run-virt.include') 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 -- cgit v1.2.3-55-g7522