summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/data/opt/openslx/vmchooser
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser')
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/hooks/image-access.d/create-rw-image.inc13
-rw-r--r--core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc3
2 files changed, 15 insertions, 1 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/hooks/image-access.d/create-rw-image.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/hooks/image-access.d/create-rw-image.inc
new file mode 100644
index 00000000..cf74cd09
--- /dev/null
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/hooks/image-access.d/create-rw-image.inc
@@ -0,0 +1,13 @@
+# This hook will be called in /opt/openslx/vmchooser/run-virt-includes/setup_image_access.inc
+# It needs to set either VM_DISKFILE_RW or VM_DISKFILE_RO
+# If none of them are set it will do default dnbd3/nfs fallbacks
+# However this module is called BEFORE any virtualizer specific plugins
+# Therefore used when implemented on a lower layer
+
+# Stuff neeeded for determination:
+# Image UUID: $IMGUUID
+# Edit Mode enabled (TRUE or FALSE): $VMCHOOSER_ADMIN_MODE
+
+writelog "Running setup image access hook: create-rw-image"
+writelog "Image UUID: ${IMGUUID}"
+writelog "EDIT MODE: ${VMCHOOSER_ADMIN_MODE}"
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
index a5c20aea..4b50f537 100644
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/vmchooser_runvirt_functions.inc
@@ -135,7 +135,8 @@ cleanexit() {
"${TASK}" &
cleanups+=( "$!" )
done
- for i in 1 1 2 2 3 3 4 4; do
+ #for i in 1 1 2 2 3 3 4 4; do
+ while true; do
usleep 500000
kill -0 "${cleanups[@]}" &> /dev/null || break
done