diff options
Diffstat (limited to 'os-plugins/plugins/vmgrid/files/run-vmgrid.sh')
-rw-r--r-- | os-plugins/plugins/vmgrid/files/run-vmgrid.sh | 17 |
1 files changed, 10 insertions, 7 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 |