diff options
author | Christian Rößler | 2013-12-17 17:04:16 +0100 |
---|---|---|
committer | Christian Rößler | 2013-12-17 17:04:16 +0100 |
commit | 5ce1a589efa011e85402bfeda699b6c63c8ebcbb (patch) | |
tree | 0b1cdac90b871b69f36202935070342aa673e997 /remote/modules/qemukvm | |
parent | [qemukvm] More qemukvm configuration (diff) | |
download | tm-scripts-5ce1a589efa011e85402bfeda699b6c63c8ebcbb.tar.gz tm-scripts-5ce1a589efa011e85402bfeda699b6c63c8ebcbb.tar.xz tm-scripts-5ce1a589efa011e85402bfeda699b6c63c8ebcbb.zip |
[qemukvm] services, addon-init, env file, udev reload etc. NOT TESTED ENOUGH!
Diffstat (limited to 'remote/modules/qemukvm')
4 files changed, 25 insertions, 1 deletions
diff --git a/remote/modules/qemukvm/data/addon-init b/remote/modules/qemukvm/data/addon-init new file mode 100755 index 00000000..cccc1e8a --- /dev/null +++ b/remote/modules/qemukvm/data/addon-init @@ -0,0 +1,8 @@ +#!/bin/ash + +systemctl daemon-reload +systemctl start qemukvm.service + +# this seems to be necessary due to the misbehaviour of udevd +# in view of the undetected ENV dev_type +systemctl restart systemd-udevd diff --git a/remote/modules/qemukvm/data/etc/systemd/system/graphical.target.wants/qemukvm.service b/remote/modules/qemukvm/data/etc/systemd/system/graphical.target.wants/qemukvm.service new file mode 120000 index 00000000..89d8afbf --- /dev/null +++ b/remote/modules/qemukvm/data/etc/systemd/system/graphical.target.wants/qemukvm.service @@ -0,0 +1 @@ +../qemukvm.service
\ No newline at end of file diff --git a/remote/modules/qemukvm/data/etc/systemd/system/qemukvm.service b/remote/modules/qemukvm/data/etc/systemd/system/qemukvm.service new file mode 100644 index 00000000..8faf5d06 --- /dev/null +++ b/remote/modules/qemukvm/data/etc/systemd/system/qemukvm.service @@ -0,0 +1,9 @@ +[Unit] +Description=Sets up the virtual box environment +Requires=vmchooser.service +After=vmchooser.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/opt/openslx/scripts/systemd-qemukvm_env start diff --git a/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env b/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env index 3173ca45..2d1483aa 100644 --- a/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env +++ b/remote/modules/qemukvm/data/opt/openslx/scripts/systemd-qemukvm_env @@ -14,8 +14,14 @@ # - This is the preparation script for the configuration of Linux Qemu/KVM. ################################################################################ + +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)" + +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 |