Qemu: add a group kvm to access /dev/kvm eaiser

As a normal user, it is not possible to use qemu with KVM. This is bad
because it is better when it is possible to start the machine with a
less privileged user. To achieve this a group KVM is created and the
access to /dev/kvm is allowed for this group. So every user in this
group can use qemu with KVM.
This change is also useful for libvirt because the VMs can be started
with user nobody and group kvm.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Jonatan Schlag
2016-06-17 13:06:40 +02:00
committed by Michael Tremer
parent 1dd61e0594
commit 5cc7ae0926
4 changed files with 8 additions and 1 deletions

View File

@@ -22,6 +22,8 @@
############################################################################
#
. /opt/pakfire/lib/functions.sh
#create the group kvm when they not exist
getent group kvm >/dev/null || groupadd kvm
extract_files
restore_backup ${NAME}
echo shm /dev/shm tmpfs defaults,size=256M 0 0 >> /etc/fstab