summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bentele2021-07-05 11:16:01 +0200
committerManuel Bentele2021-07-05 11:16:01 +0200
commitf5352bd9edaf932ecaed1dc870aaeedc038c410e (patch)
tree0bc6d6643e7bf11b632713b6a0bd429ad2708929
parent[qemu] Fix usage of wrong run-virt variables (diff)
downloadmltk-f5352bd9edaf932ecaed1dc870aaeedc038c410e.tar.gz
mltk-f5352bd9edaf932ecaed1dc870aaeedc038c410e.tar.xz
mltk-f5352bd9edaf932ecaed1dc870aaeedc038c410e.zip
[qemu] Enable output of finalized Libvirt config in debug mode
-rw-r--r--core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include
index c3dfd21d..04dca832 100644
--- a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include
+++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include
@@ -35,8 +35,10 @@ run_plugin() {
vm_diskfile="${VM_DISKFILE_RW}"
fi
- # write finalized config to temporary folder for debugging purposes
- local vm_final_run_file="/tmp/qemu-last-config.xml"
+ # write finalized config in debug mode to temporary folder for debugging purposes
+ if [ "${DEBUG}" = "true" ]; then
+ local vm_final_config="/tmp/qemu-last-config.xml"
+ fi
# call the Libvirt Java tool to finalize configuration and start VM
declare -rg VIRTCMD="java"
@@ -47,7 +49,7 @@ run_plugin() {
notempty VM_DISPLAYNAME && VIRTCMDOPTS+=( "-vmdsplname" "${VM_DISPLAYNAME}" )
notempty VM_OS_TYPE && VIRTCMDOPTS+=( "-vmos" "${VM_OS_TYPE}" )
notempty TMPCONFIG && VIRTCMDOPTS+=( "-vmcfginp" "${TMPCONFIG}" )
- notempty vm_final_run_file && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_run_file}" )
+ notempty vm_final_config && VIRTCMDOPTS+=( "-vmcfgout" "${vm_final_config}" )
notempty IMGUUID && VIRTCMDOPTS+=( "-vmuuid" "${IMGUUID}" )
notempty HW_CORES && VIRTCMDOPTS+=( "-vmncpus" "${HW_CORES}" )
notempty VM_MEM && VIRTCMDOPTS+=( "-vmmem" "${VM_MEM}" )