diff options
author | Christian Rößler | 2015-09-14 15:22:15 +0200 |
---|---|---|
committer | Christian Rößler | 2015-09-14 15:22:15 +0200 |
commit | 2ba25839c3d9ad12578b0a9a3a7915becfa4ddfe (patch) | |
tree | 57a4288d2b50e3eacdda227cb59f90c38368ec5f /remote | |
parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
download | tm-scripts-2ba25839c3d9ad12578b0a9a3a7915becfa4ddfe.tar.gz tm-scripts-2ba25839c3d9ad12578b0a9a3a7915becfa4ddfe.tar.xz tm-scripts-2ba25839c3d9ad12578b0a9a3a7915becfa4ddfe.zip |
[runvirt] cpu handling (maxcpu etc)
Diffstat (limited to 'remote')
-rw-r--r-- | remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc b/remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc index 7edac642..b7ed648c 100644 --- a/remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc +++ b/remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc @@ -52,6 +52,10 @@ xmlvirt=$(grep -o 'virtualmachine param=.*"' "${xmlfile}" \ # choose the proper virtualization/emulator plugin [ "x${xmlvirt}" != "x" -a "x${xmlvirt}" != "xqemukvm" -a "x${xmlvirt}" != "xvirtualbox" -a "x${xmlvirt}" != "xvmware" ] && xmlvirt="emufe" +# Extracting OS type (vmostype) from xml file. We don't care here whether vmostype is empty, as then +# it will yield the default entries later on. +vmostype=$(grep -io '<os param=.*"' "${xmlfile}" | sed -e "s/&.*;/; /g" | awk -F '"' '{ print $2 }') + # make a guess from the filename extension if ${xmlvirt} is empty # (not set within the XML file) # TODO: implement possibility to submit own configuration files @@ -96,4 +100,4 @@ redirects=0 writelog "\tVirtualization:\t\t$xmlvirt" writelog "\tVM name:\t\t$vm_name" writelog "\tVM short name:\t\t$vm_shortname" - +writelog "\tVM OS:\t\t$vmostype" |