summaryrefslogtreecommitdiffstats
path: root/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env
diff options
context:
space:
mode:
authorJonathan Bauer2017-08-17 18:09:18 +0200
committerJonathan Bauer2017-08-17 18:09:18 +0200
commitdd9f5e920cff8432ab31d9a3f6318a10daec8711 (patch)
tree8cd71a8ee32269ed4fe3f79dab77b411ca1f1a16 /core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env
parentMerge branch 'master' of git.openslx.org:openslx-ng/mltk (diff)
downloadmltk-dd9f5e920cff8432ab31d9a3f6318a10daec8711.tar.gz
mltk-dd9f5e920cff8432ab31d9a3f6318a10daec8711.tar.xz
mltk-dd9f5e920cff8432ab31d9a3f6318a10daec8711.zip
[qemukvm] reworked qemu run-virt module
now uses a similar structure than the vmware plugin for run-virt guest OS stuff needs to go aways, kept for compat reasons for now TODO metadata handling in bwLehrpool-Suite
Diffstat (limited to 'core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env')
-rw-r--r--core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env19
1 files changed, 6 insertions, 13 deletions
diff --git a/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env b/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env
index e19ae1ee..03a138be 100644
--- a/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env
+++ b/core/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env
@@ -1,6 +1,6 @@
#!/bin/ash
# -----------------------------------------------------------------------------
-# Copyright (c) 2013 - OpenSLX GmbH
+# Copyright (c) 2017 - OpenSLX GmbH
#
# This program/file is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -14,20 +14,13 @@
# - This is the preparation script for the configuration of Linux Qemu/KVM.
################################################################################
-
+# lazy load all kvm related modules
modprobe kvm
modprobe kvm_amd
modprobe kvm_intel
-# 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/sbin/brctl addif br0 kvmnet*
-ALL ALL=NOPASSWD: /opt/openslx/bin/ip link set dev kvmnet* *
-EOF
+if [ ! -e /dev/kvm ]; then
+ slxlog "qemukvm-modules" "/dev/kvm not found! Missing kvm kernel module(s)?"
+ exit 1
+fi