diff options
Diffstat (limited to 'remote/modules/qemukvm/data/opt/openslx/scripts')
| -rw-r--r-- | remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env b/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env new file mode 100644 index 00000000..3173ca45 --- /dev/null +++ b/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env @@ -0,0 +1,27 @@ +#!/bin/ash +# ----------------------------------------------------------------------------- +# Copyright (c) 2013 - 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 +# ----------------------------------------------------------------------------- +# systemd-qemukvm_env +# - This is the preparation script for the configuration of Linux Qemu/KVM. +################################################################################ + +# check for Linux kvm modules (if required at all) +# lsmod |grep kvm || slxlog "qemukvm-modules" "Cannot find any kvm kernel module(s)" + +cat >> /etc/sudoers << EOF +# allow to start and stop kvm services / load-/unload kvm modules +ALL ALL=NOPASSWD: /opt/openslx/sbin/tunctl -t kvmnet* +ALL ALL=NOPASSWD: /opt/openslx/sbin/tunctl -d kvmnet* +ALL ALL=NOPASSWD: /opt/openslx/usr/sbin/brctl addif br0 kvmnet* +ALL ALL=NOPASSWD: /opt/openslx/bin/ip link set dev kvmnet* * +EOF + |
