]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
libvirtd: Enable required cgroups
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Jul 2021 11:14:13 +0000 (11:14 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 19 Jul 2021 18:13:55 +0000 (18:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/libvirt
src/initscripts/packages/libvirtd

index 28a95d317db780cecc6141d11e0fd35470caeeaf..b680cbb3d66678b820fe1f578c174cbea02e881f 100644 (file)
@@ -33,7 +33,7 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 SUP_ARCH   = i586 x86_64
 PROG       = libvirt
-PAK_VER    = 25
+PAK_VER    = 26
 
 DEPS       = ebtables libpciaccess libtirpc libyajl ncat qemu
 
index 40bc6bee3459c04290c3559bc9fc48b8e21edf68..f0a0b1e8ab2cf0f6d81f1869aa09671caaa2260e 100644 (file)
@@ -20,9 +20,14 @@ case $1 in
                boot_mesg "Load required kernel modules for Libvirt"
                modprobe tun vhost_net
                evaluate_retval
+
+               # Enable required cgroup controllers
+               if [ -d "/sys/fs/cgroup" ]; then
+                       echo "+cpu +io" > /sys/fs/cgroup/cgroup.subtree_control
+               fi
+
                boot_mesg "Starting Libvirt Daemon..."
                loadproc /usr/sbin/libvirtd -d
-
                ;;
 
        stop)