summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmgrid/files/vmgrid
diff options
context:
space:
mode:
authorMichael Janczyk2010-04-08 21:12:10 +0200
committerMichael Janczyk2010-04-08 21:12:10 +0200
commit8d36684e70cb0e83133f9e671039de2c48461478 (patch)
tree58a04937e405d0a8b225d1ae616d6df08f5c6529 /os-plugins/plugins/vmgrid/files/vmgrid
parentchanged name of init-hook, qemukvm tun/tap config (diff)
downloadcore-8d36684e70cb0e83133f9e671039de2c48461478.tar.gz
core-8d36684e70cb0e83133f9e671039de2c48461478.tar.xz
core-8d36684e70cb0e83133f9e671039de2c48461478.zip
annoying warning from demuxer removed, has to be solved otherwise
virtualization plugin refurbished virtualbox can boot now 64 bit guests on 32 bit hosts
Diffstat (limited to 'os-plugins/plugins/vmgrid/files/vmgrid')
-rw-r--r--os-plugins/plugins/vmgrid/files/vmgrid50
1 files changed, 4 insertions, 46 deletions
diff --git a/os-plugins/plugins/vmgrid/files/vmgrid b/os-plugins/plugins/vmgrid/files/vmgrid
index b75b5341..ef86cb5a 100644
--- a/os-plugins/plugins/vmgrid/files/vmgrid
+++ b/os-plugins/plugins/vmgrid/files/vmgrid
@@ -44,6 +44,9 @@ RWSHARE=/var/opt/openslx/plugins/vmgrid/share
# include general configuration from vmgrid
[ -f ${PLUGINCONFDIR}/vmgrid.conf ] && \
. ${PLUGINCONFDIR}/vmgrid.conf
+# load general virtualization information
+[ -f ${PLUGINCONFROOT}/virtualization/virtualization.conf ] && \
+ . ${PLUGINCONFROOT}/virtualization/virtualization.conf
# get the vmchooser_active var
[ -f ${PLUGINCONFROOT}/vmchooser/vmchooser.conf ] && \
. ${PLUGINCONFROOT}/vmchooser/vmchooser.conf
@@ -77,11 +80,7 @@ echo "Starting to log at $(date)" \
vmgrid_memratio=$(echo ${vmgrid_memratio} | sed -e "s, *,,g")
vmgrid_startvms=$(echo ${vmgrid_startvms} | sed -e "s, *,,g")
-# get total amount of memory installed in your machine
-# TODO: stage 3? virtaulization plugin
-totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024)
-
-# get hostmem
+# get hostmem, totalmem from stage 3
hostratio=$(echo ${vmgrid_memratio} | awk -F ',' '{print $6}')
hostmem=$(expr ${totalmem} \* ${hostratio} / 100 2>/dev/null)
if [ ${hostmem} -lt 256 2>/dev/null ]; then
@@ -165,44 +164,3 @@ for i in {1..4}; do
done
exit 0
-
-################################################################################
-### old stuff with xml files
-################################################################################
-#
-#filter_autostart=$(grep -i "active param" ${vmgrid_xmlpath}/*.xml | \
-# grep -E "true|1" | awk -F ":" '{print $1}')
-#
-## wozu mehrere starten -> siehe cherkasova
-#
-#filter_virt=
-#for i in ${filter_autostart}; do
-# filter_temp=
-# filter_temp=$(cat $i | grep -i "virtualmachine param.*${vmgrid_virt}" | \
-# wc -l)
-# if [ ${filter_temp} -eq 1 ]; then
-# filter_virt="${filter_virt} $i"
-# fi
-#done
-#
-## remove already started ${vmgrid_startvm}
-#filter_virt=$(echo $filter_virt | \
-# sed -e "s,${vmgrid_xmlpath}/${vmgrid_startvm%.xml}.xml,,g")
-#
-#sort_virt=$(grep 'priority param' ${vmgrid_xmlpath}/*.xml | sort -n | \
-# awk -F ":" '{print $1}')
-#
-#for i in ${sort_virt}; do
-# j=$(echo $filter_virt | grep $i | wc -l)
-# if [ $j -eq 1 ]; then
-# filter_virt=$(echo $filter_virt | sed -e "s,$i,,g")
-# vmgrid ${i#${vmgrid_xmlpath}/}
-# fi
-#done
-#
-## start vms /wo priority
-#for i in ${filter_virt}; do
-# vmgrid ${i#${vmgrid_xmlpath}/}
-#done
-#
-#exit 0