diff options
author | Dirk von Suchodoletz | 2009-02-24 20:04:24 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2009-02-24 20:04:24 +0100 |
commit | a61d27fd1226e4b9fa7e7e871691ff9b79bbd195 (patch) | |
tree | eb376be6f1ff196b999888e35a83d2e21ef4eba9 /os-plugins/plugins/vmchooser/files/run-virt.sh | |
parent | * test fix for dbus/hal problems (diff) | |
download | core-a61d27fd1226e4b9fa7e7e871691ff9b79bbd195.tar.gz core-a61d27fd1226e4b9fa7e7e871691ff9b79bbd195.tar.xz core-a61d27fd1226e4b9fa7e7e871691ff9b79bbd195.zip |
Some fixes for the new run-virt.sh system ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2636 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'os-plugins/plugins/vmchooser/files/run-virt.sh')
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index c195e7c1..f206af8c 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -51,6 +51,23 @@ displayname=${short_description} virt_mach=$(grep "virtualmachine param=\"" ${xml} | \ sed -e "s/&.*;/; /g" | awk -F "\"" '{print $2}') +echo "x${virt_mach}x" + +# make a guess from the filename extension if ${virt_mach} +if [ -z ${virt_mach} ] ; then + case "${imagename#*.}" in + vmdk|VMDK) + virt_mach="vmware" + ;; + img|IMG|qcow*|QCOW*) + virt_mach="qemukvm" + ;; + vbox|VBOX) + virt_mach="qemukvm" + ;; + esac +fi + # definition of the client system vmostype=$(grep -i "<os param=\"" ${xml} | awk -F "\"" '{ print $2 }') @@ -75,6 +92,7 @@ totalmem=$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') / 1024) mac=$(/sbin/ifconfig eth0 | grep eth0 | sed -e "s/ //g" \ | awk -F ":" '{print $(NF-1)":"$NF}') +echo "$totalmem, $mac" # virtual fd/cd/dvd and drive devices, floppy b: for configuration #floppya is always false, if we have a floppy device or not isn't @@ -154,6 +172,8 @@ cp ${xml} /var/lib/virt/vmchooser/fd-loop/config.xml # check if virtual machine container file exists filecheck +echo ${virt_mach} + # get all virtual machine specific stuff from the respective include file if [ -e /etc/opt/openslx/run-${virt_mach}.include ] ; then . /etc/opt/openslx/run-${virt_mach}.include |