summaryrefslogtreecommitdiffstats
path: root/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc')
-rw-r--r--core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc b/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc
index e066a55c..32637e5d 100644
--- a/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc
+++ b/core/modules/qemukvm/data/opt/openslx/vmchooser/plugins/qemukvm/includes/setup_rw_layer.inc
@@ -7,15 +7,18 @@ setup_rw_layer() {
# setup qcow2 backing file for that disk file
writelog "Creating backing file for '${VM_DISKFILE_RO}'..."
+ # TODO: WTF? This is fucked up, VM_DISKFILE_RW is set if we want to run in persistent mode,
+ # this plugin shouldn't mess around with it....
declare -rg VM_DISKFILE_RW="${TMPDIR}/$(basename ${VM_DISKFILE_RO}).qcow2"
if qemu-img create -f qcow2 -b "${VM_DISKFILE_RO}" "${VM_DISKFILE_RW}"; then
# all good, use it as main disk drive
# TODO: determine the proper type of controller to use, ideally virtio?
- VIRTCMDOPTS="${VIRTCMDOPTS} -drive if=virtio,format=qcow2,file=${VM_DISKFILE_RW}"
+ VIRTCMDOPTS+=("-drive" "if=virtio,format=qcow2,file=${VM_DISKFILE_RW}" )
else
writelog "Error creating backing file for '${VM_DISKFILE_RO}'"
# TODO use -snapshot as fallback, test it!
- VIRTCMDOPTS="${VIRTCMDOPTS} -snapshot"
+ # How is this supposed to even work without a disk?
+ VIRTCMDOPTS+=( "-snapshot" )
fi
}