summaryrefslogtreecommitdiffstats
path: root/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include')
-rw-r--r--core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include44
1 files changed, 44 insertions, 0 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
new file mode 100644
index 00000000..9f2b1291
--- /dev/null
+++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/run-virt.include
@@ -0,0 +1,44 @@
+# -----------------------------------------------------------------------------
+#
+# Copyright (c) 2009..2021 bwLehrpool-Projektteam
+#
+# This program/file is free software distributed under the GPL version 2.
+# See https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
+#
+# If you have any feedback please consult https://bwlehrpool.de and
+# send your feedback to bwlehrpool@hs-offenburg.de.
+#
+# General information about bwLehrpool can be found at https://bwlehrpool.de
+#
+# -----------------------------------------------------------------------------
+# run-virt.include
+# - qemu plugin for vmchooser run-virt
+################################################################################
+
+# BASH_SOURCE[0] contains the file being sourced, namely this one
+declare -rg QEMU_PLUGIN_DIR="$(dirname "${BASH_SOURCE[0]}")"
+declare -rg QEMU_INCLUDE_DIR="${QEMU_PLUGIN_DIR}/includes"
+
+# TODO make this part of the metadata coming from the server
+# TBD: "firewall printer usb slxfloppy sound netshares"
+declare -rg PLUGIN_FEATURES="slxfloppy"
+
+run_plugin() {
+ # declaration of default functions and variables for vmware
+ $(safesource --exit "${QEMU_INCLUDE_DIR}/init_core.inc")
+
+ # determine limitations wrt RAM and CPU count of VM
+ $(safesource "${QEMU_INCLUDE_DIR}/determine_hardware_limitations.inc")
+
+ # setup networking
+ $(safesource "${QEMU_INCLUDE_DIR}/setup_network.inc")
+
+ # setup rw layer for ro image
+ $(safesource "${QEMU_INCLUDE_DIR}/setup_rw_layer.inc")
+
+ # build the final start command
+ $(safesource "${QEMU_INCLUDE_DIR}/finalize_start_command.inc")
+
+ # print summary - needs writelog() from vmchooser-run_virt
+ $(safesource "${QEMU_INCLUDE_DIR}/log_config_summary.inc")
+}