blob: a458f255a1e5e627f30a7c2aa869b5c7d49160d4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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="${VIRTCMDOPTS} -cpu host"
# set cpu cores
VIRTCMDOPTS="${VIRTCMDOPTS} -smp ${CPU_CORES}"
# set RAM
VIRTCMDOPTS="${VIRTCMDOPTS} -m ${VM_MEM}"
# special feature for real and virtual floppy disks
isset FLOPPY_0 && VIRTCMDOPTS="${VIRTCMDOPTS} -fda ${FLOPPY_0}"
isset SLX_FLOPPY_IMG && VIRTCMDOPTS="${VIRTCMDOPTS} -fdb ${SLX_FLOPPY_IMG}"
# add optical drive if available
isset CDROM_0 && VIRTCMDOPTS="${VIRTCMDOPTS} -cdrom ${CDROM_0}"
# audio
isset SOUND_DEV && VIRTCMDOPTS="${VIRTCMDOPTS} -soundhw ${SOUND_DEV}"
# serial devices TODO test
if isset SERIAL_PORTS; then
for DEV in $SERIAL_PORTS; do
: # buggeh: VIRTCMDOPTS="${VIRTCMDOPTS} -serial ${DEV}"
done
fi
}
call_post_source finalize_start_command
|