diff options
author | Michael Janczyk | 2010-04-08 21:12:10 +0200 |
---|---|---|
committer | Michael Janczyk | 2010-04-08 21:12:10 +0200 |
commit | 8d36684e70cb0e83133f9e671039de2c48461478 (patch) | |
tree | 58a04937e405d0a8b225d1ae616d6df08f5c6529 /os-plugins/plugins/vmgrid/files | |
parent | changed name of init-hook, qemukvm tun/tap config (diff) | |
download | core-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')
-rw-r--r-- | os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 17 | ||||
-rw-r--r-- | os-plugins/plugins/vmgrid/files/vmgrid | 50 |
2 files changed, 14 insertions, 53 deletions
diff --git a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh index 626dfcca..bf10dc36 100644 --- a/os-plugins/plugins/vmgrid/files/run-vmgrid.sh +++ b/os-plugins/plugins/vmgrid/files/run-vmgrid.sh @@ -27,8 +27,9 @@ RWSHARE=/var/opt/openslx/plugins/vmgrid/share # include general configuration from vmgrid [ -f ${PLUGINCONFVMGRID}/vmgrid.conf ] && \ . ${PLUGINCONFVMGRID}/vmgrid.conf -#[ -f ${PLUGINCONFVMGRID}/vmgrid.include ] && \ -# . ${PLUGINCONFVMGRID}/vmgrid.include +# 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 @@ -64,7 +65,8 @@ while [ $# -gt 0 ]; do headless=0 ;; --forcemem) - forcemem=$2 + # get a result which can be divided through 4 + forcemem=$(expr $2 / 4 \* 4) shift ;; *) @@ -281,7 +283,8 @@ if [ "${vmgrid_virt}" != "${xmlvirt}" ]; then fi # definition of the client system -vmostype=$(grep -io '<os param=.*"' ${xmlfile} | awk -F '"' '{ print $2 }') +vmostype=$(grep -io '<os param=.*"' ${xmlfile} | awk -F '"' '{ print $2 }' \ + | tr [A-Z] [a-z]) # definition of the networking the client system is connected to network_kind=$(grep -io 'network param=.*"' ${xmlfile} \ @@ -305,9 +308,9 @@ writelog "\tVM short name:\t\t$vm_shortname" # check for CPU virtualization flags #vmgrid::hvm -# get total amount of memory installed in your machine -totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024) +# total amount of memory defined in stage 3 permem=60 +# get a result which can be divided through 4 mem=$(expr ${totalmem} / 100 \* ${permem} / 4 \* 4) #vmgrid::maxram #vmgrid::minram @@ -350,7 +353,7 @@ writelog "\tVM Hostname:\t\t$hostname" # Get all virtual machine specific stuff from the respective include file # TODO: rename to run-vuirt.include if [ -e ${PLUGINCONFROOT}/${vmgrid_virt}/run-virt.include ] ; then - writelog "Strating ${vmgrid_virt} specific part ..." + writelog "Starting ${vmgrid_virt} specific part ..." self=${vmgrid_virt} . ${PLUGINCONFROOT}/${vmgrid_virt}/run-virt.include else 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 |