summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/run-virt/data/opt/openslx/scripts/includes/get_xml_file_variables.inc6
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"