diff options
Diffstat (limited to 'core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include')
-rw-r--r-- | core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include new file mode 100644 index 00000000..7d1149b0 --- /dev/null +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemukvm/run-virt.include @@ -0,0 +1,44 @@ +# ----------------------------------------------------------------------------- +# +# Copyright (c) 2009..2018 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/kvm plugin for vmchooser run-virt +################################################################################ + +# BASH_SOURCE[0] contains the file being sourced, namely this one +declare -rg QEMUKVM_PLUGIN_DIR="$(dirname "${BASH_SOURCE[0]}")" +declare -rg QEMUKVM_INCLUDE_DIR="${QEMUKVM_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 "${QEMUKVM_INCLUDE_DIR}/init_core.inc") + + # determine limitations wrt RAM and CPU count of VM + $(safesource "${QEMUKVM_INCLUDE_DIR}/determine_hardware_limitations.inc") + + # setup networking + $(safesource "${QEMUKVM_INCLUDE_DIR}/setup_network.inc") + + # setup rw layer for ro image + $(safesource "${QEMUKVM_INCLUDE_DIR}/setup_rw_layer.inc") + + # build the final start command + $(safesource "${QEMUKVM_INCLUDE_DIR}/finalize_start_command.inc") + + # print summary - needs writelog() from vmchooser-run_virt + $(safesource "${QEMUKVM_INCLUDE_DIR}/log_config_summary.inc") +} |