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 --- os-plugins/plugins/vmware/files/run-virt.include | 83 ++++++++++-------------- 1 file changed, 35 insertions(+), 48 deletions(-) (limited to 'os-plugins/plugins/vmware/files/run-virt.include') diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 9472d87f..2010dc4b 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -236,8 +236,6 @@ conffile="${confdir}/run-vmware.conf" diskfile=${vmpath} # users vmware config folder vmhome="${HOME}/.vmware" -# logfile -logfile=${OPENSLX_DEFAULT_LOGDIR}/run-vmware.${USER}.$$.log # get several version infos for vmware/player . ${OPENSLX_DEFAULT_CONFDIR}/plugins/vmware/vmware.conf @@ -302,41 +300,41 @@ case "$parallel" in esac # adjust memory available for vmware guests -if [ -n "${forcemem}" ]; then - mem="${forcemem}" -else - case "$vmversion" in - 2.*|6.*) - permem=30 - ;; - 3.*|7.*) - permem=25 - ;; - esac - if [ "${totalmem}" -ge "2500" ]; 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 - if [ "${totalmem}" -ge "2500" ]; then - permem=40 - confdir=/dev/shm/vmware/$USER - conffile=${confdir}/run-vmware.conf - mkdir -p /dev/shm/vmware/$USER - fi - fi - mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) - if [ "${id44}" = "1" ]; then - hostmem=$(expr ${totalmem} - ${mem}) - else - hostmem=$(expr ${totalmem} - ${mem} - ${mem}) - fi -fi +#if [ -n "${forcemem}" ]; then +# mem="${forcemem}" +#else +# case "$vmversion" in +# 2.*|6.*) +# permem=30 +# ;; +# 3.*|7.*) +# permem=25 +# ;; +# esac +# if [ "${totalmem}" -ge "2500" ]; 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 +# if [ "${totalmem}" -ge "2500" ]; then +# permem=40 +# confdir=/dev/shm/vmware/$USER +# conffile=${confdir}/run-vmware.conf +# mkdir -p /dev/shm/vmware/$USER +# fi +# fi +# mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) +# if [ "${id44}" = "1" ]; then +# hostmem=$(expr ${totalmem} - ${mem}) +# else +# hostmem=$(expr ${totalmem} - ${mem} - ${mem}) +# fi +#fi # check if ide/scsi and hwver of image # read only the first 30 lines to be shure @@ -387,16 +385,6 @@ done # logging and stdout ################################################################################ -# function to write to stdout and logfile -writelog () -{ - # write to stdout - echo -e "$1" - - # log in file - echo -e "$1" >>${logfile} -} - # log script information writelog "# File created by $0 (VMversion ${vmversion})\n# on $(date)\n" writelog "Starting with non-persistent mode ...\n" @@ -415,7 +403,6 @@ writelog "\tConfdir:\t${confdir}" writelog "\tConffile:\t${conffile}" writelog "\tRedodir:\t${redodir}" writelog "\tVMhome:\t\t${vmhome}" -writelog "\tLogfile:\t${logfile}" writelog "\t/tmp info: \ $(grep "/tmp " /proc/mounts) $(df -h | grep " /tmp$" | awk '{print $2}')" # hw setup -- cgit v1.2.3-55-g7522