diff options
author | Manuel Bentele | 2021-02-04 10:13:25 +0100 |
---|---|---|
committer | Manuel Bentele | 2021-02-04 10:13:25 +0100 |
commit | d06889f7a59724823a6bae05b309704322d86a35 (patch) | |
tree | 317a620fbf54beec31c2d5cf09d23157409f65b3 /core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc | |
parent | [qemu] Rename 'qemukvm' core module to 'qemu' (diff) | |
download | mltk-d06889f7a59724823a6bae05b309704322d86a35.tar.gz mltk-d06889f7a59724823a6bae05b309704322d86a35.tar.xz mltk-d06889f7a59724823a6bae05b309704322d86a35.zip |
[qemu] Rename 'qemukvm' occurrences in the core module to 'qemu'
Diffstat (limited to 'core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc')
-rw-r--r-- | core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc new file mode 100644 index 00000000..6d9df363 --- /dev/null +++ b/core/modules/qemu/data/opt/openslx/vmchooser/plugins/qemu/includes/finalize_start_command.inc @@ -0,0 +1,49 @@ +# ----------------------------------------------------------------------------- +# +# 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 +# - Include script for running the QEMU/Linux KVM virtual machine on an +# OpenSLX client via the run-virt.sh or run-vmgrid.sh +################################################################################ + +# set options that depend on previous includes +# and build the final start command +finalize_start_command() { + + # set cpu type + VIRTCMDOPTS+=( "-cpu" "host" ) + # set cpu cores + VIRTCMDOPTS+=( "-smp" "${CPU_CORES}" ) + + # set RAM + VIRTCMDOPTS+=( "-m" "${VM_MEM}" ) + + # special feature for real and virtual floppy disks + isset FLOPPY_0 && VIRTCMDOPTS+=( "-fda" "${FLOPPY_0}" ) + isset SLX_FLOPPY_IMG && VIRTCMDOPTS+=( "-fdb" "${SLX_FLOPPY_IMG}" ) + + # add optical drive if available + isset CDROM_0 && VIRTCMDOPTS+=( "-cdrom" "${CDROM_0}" ) + + # audio + isset SOUND_DEV && VIRTCMDOPTS+=( "-soundhw" "${SOUND_DEV}" ) + + # serial devices TODO test + if isset SERIAL_PORTS; then + for DEV in $SERIAL_PORTS; do + : # buggeh: VIRTCMDOPTS+=( "-serial" "${DEV}" ) + done + fi +} + +call_post_source finalize_start_command |