diff options
| author | Michael Janczyk | 2010-03-21 19:50:12 +0100 |
|---|---|---|
| committer | Michael Janczyk | 2010-03-21 19:50:12 +0100 |
| commit | 994aa36c095470f1c163e32b28fa324f7376f127 (patch) | |
| tree | a1d0da469c9b0dbb390d56943a8c014a35aa7d00 /os-plugins/plugins/qemukvm/files/run-virt.include | |
| parent | added rw share support for vmgrid and virtualbox (diff) | |
| download | core-994aa36c095470f1c163e32b28fa324f7376f127.tar.gz core-994aa36c095470f1c163e32b28fa324f7376f127.tar.xz core-994aa36c095470f1c163e32b28fa324f7376f127.zip | |
qemukvm angepasst... geht noch nicht :(
Diffstat (limited to 'os-plugins/plugins/qemukvm/files/run-virt.include')
| -rw-r--r-- | os-plugins/plugins/qemukvm/files/run-virt.include | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/os-plugins/plugins/qemukvm/files/run-virt.include b/os-plugins/plugins/qemukvm/files/run-virt.include index b1f76535..8d6d442b 100644 --- a/os-plugins/plugins/qemukvm/files/run-virt.include +++ b/os-plugins/plugins/qemukvm/files/run-virt.include @@ -1,6 +1,7 @@ -# qemukvm.include -# -# Copyright (c) 2009 - OpenSLX GmbH +# run-virt.include +# ----------------------------------------------------------------------------- +# Copyright (c) 2009..2010 - RZ Uni Freiburg +# Copyright (c) 2009..2010 - OpenSLX GmbH # # This program/file is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -9,13 +10,26 @@ # send your feedback to feedback@openslx.org # # General information about OpenSLX can be found at http://openslx.org -# -# Include script for running the QEMU/Linux KVM virtual machine on an OpenSLX -# client via the run-virt.sh. The stuff is copied to /etc/opt/openslx/run- -# qemukvm.include during stage3. +# ----------------------------------------------------------------------------- +# run-virt.include +# - Include script for running the QEMU/Linux KVM virtual machine on an +# OpenSLX client via the run-virt.sh or run-vmgrid.sh +################################################################################ + +################################################################################ +### Include general configuration +################################################################################ +if [ -f ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf ]; then + . ${OPENSLX_DEFAULT_CONFDIR}/plugins/${self}/${self}.conf +else + writelog "Problems reading config file of ${self} plugin" + # TODO: exit wenn conf wichtig + #exit 1 +fi -# include general configuration from vmchooser -. /etc/opt/openslx/run-virt.include +################################################################################ +### Pepare and configure virtual machine and disk image +################################################################################ permem=50 mem=$(expr ${totalmem} / 100 \* ${permem}) @@ -72,6 +86,8 @@ for tool in kvm qemu-kvm qemu; do VIRTCMD=$(which ${tool} 2>/dev/null) [ "x$VIRTCMD" != "x" ] && break done + [ -z $VIRTCMD ] && { writelog "No qemu/kvm tool found."; exit 1; } + VIRTCMD="sudo $VIRTCMD" VIRTCMDOPTS="${VIRTCMDOPTS} -boot c -alt-grab ${diskfile}" |
