summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmware/files/run-virt.include
diff options
context:
space:
mode:
authorDirk von Suchodoletz2010-08-23 00:04:25 +0200
committerDirk von Suchodoletz2010-08-23 00:04:25 +0200
commit5ce218636808fc27d2f8315dafde4c1a45bd0bc0 (patch)
treefef0254217e0a1cb6f41681996399fb15ea52bbc /os-plugins/plugins/vmware/files/run-virt.include
parentPermission problem of d-------- for opt/openslx in stage1 should be (diff)
parentchanged to 50% ram for vbox and vmware (diff)
downloadcore-5ce218636808fc27d2f8315dafde4c1a45bd0bc0.tar.gz
core-5ce218636808fc27d2f8315dafde4c1a45bd0bc0.tar.xz
core-5ce218636808fc27d2f8315dafde4c1a45bd0bc0.zip
Merge branch 'master' of openslx.org:openslx/core
Diffstat (limited to 'os-plugins/plugins/vmware/files/run-virt.include')
-rw-r--r--os-plugins/plugins/vmware/files/run-virt.include83
1 files changed, 35 insertions, 48 deletions
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