summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/qemukvm/files/run-virt.include
blob: 263801ccdf52dacdbb0b571b90aa3026cce197a3 (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
50
51
52
53
54
55
56
# qemukvm.include
#
# Copyright (c) 2009 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your feedback to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org
#
# Include script for running the QEMU/Linux KVM virtual machine on an OpenSLX
# client via the run-virt.sh. The stuff is copied to /etc/opt/openslx/run-
# qemukvm.include during stage3.

# include general configuration from vmchooser
. /etc/opt/openslx/run-virt.include

permem=66
mem=$(expr ${totalmem} * ${permem})
VIRTCMDOPTS="${VIRTCMDOPTS} -m ${mem}"

# virtual fd/cd/dvd and drive devices, floppy b: for configuration
#VIRTCMDOPTS="${VIRTCMDOPTS} -fda /dev/fd0"
VIRTCMDOPTS="${VIRTCMDOPTS} -fdb /var/lib/virt/vmchooser/loopimg/fd.img"
#floppy0="FALSE"
# if $floppy_0 from run-virt.include set then floppy0="TRUE"
#[ -n "$floppy_0" ] && floppy0="TRUE"
#floppy1="TRUE"
#floppy1name="/var/lib/virt/vmchooser/loopimg/fd.img"
cdrom0="FALSE"
# if $cdrom_0 from run-virt.include set then cdrom0="TRUE"
[ -n "$cdrom_0" ] && cdrom0="TRUE"
cdrom1="FALSE"
# if $cdrom_1 from run-virt.include set then cdrom1="TRUE"
[ -n "$cdrom_1" ] && cdrom1="TRUE"
# ide is expected default, test for the virtual disk image type should
# be done while creating the runscripts ...
ide="TRUE"
hddrv="ide"

# audio
VIRTCMDOPTS="${VIRTCMDOPTS} -soundhw es1370"

# serial
#VIRTCMDOPTS="${VIRTCMDOPTS} -serial /dev/ttyS0"

# set the variables appropriately
for i in kvm qemu-kvm qemu; do
  VIRTCMD=$(which kvm 2>/dev/null)
  [ -n $VIRTCMD ] && break
done
[ -n $VIRTCMD ] && { writelog "No qemu/kvm tool found."; exit 1; }
VIRTCMDOPTS="${VIRTCMDOPTS} -boot c -alt-grab ${diskfile}"