From patchwork Fri Jul 16 11:14:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 4540 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GR7t51ly7z3xGl for ; Fri, 16 Jul 2021 11:14:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GR7t43bbnz6FZ; Fri, 16 Jul 2021 11:14:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GR7t35mhFz2yyN; Fri, 16 Jul 2021 11:14:19 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GR7t22S7Xz2xgw for ; Fri, 16 Jul 2021 11:14:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GR7t21gb9z1xQ; Fri, 16 Jul 2021 11:14:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1626434058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=010KidPP3+axarzloH1mGhI2dSQRjyYsn5/PV9a0iiM=; b=p1/+jvZLIiSNQMNaFQPnBU5BmGSb5/QzdmHFK+usBmd9Sw42zpgP0CT6/uQ9GYvO/lwO6K JhFg/NO0L2lefRDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1626434058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=010KidPP3+axarzloH1mGhI2dSQRjyYsn5/PV9a0iiM=; b=sonU15G9pZbOno0FKQeHwHyOcs5pXs/+AkUpyBzOsY04xcagIKel74T5DbI2m9lRnHYM/N njz1O6oV54Zw80kgjDu+ohQaccfaSaZPWBNYy/1IibAE7belcXXNoB3h+nRSDuSZZVs99x n4JjHGEICLAj1+kave7TtOo4TYfvEcfSE+0YpBSKFsoduF055f04QQuWdz112eyvYuuDaj dCLetER/pg3u2HWD1Kb20HBNBoOruScCvpu62aUvOaLUIycQT6mCNnVS+Sh0nfMw81Bhpn j5lHDXue5IZ01NAh+B/mR2cZUxjIooInGMeB+YgWoVpczcI7mVn4ikbesB7Lyg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/2] libvirtd: Enable required cgroups Date: Fri, 16 Jul 2021 11:14:13 +0000 Message-Id: <20210716111413.23497-2-michael.tremer@ipfire.org> In-Reply-To: <20210716111413.23497-1-michael.tremer@ipfire.org> References: <20210716111413.23497-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- lfs/libvirt | 2 +- src/initscripts/packages/libvirtd | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lfs/libvirt b/lfs/libvirt index 28a95d317..b680cbb3d 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -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 diff --git a/src/initscripts/packages/libvirtd b/src/initscripts/packages/libvirtd index 40bc6bee3..f0a0b1e8a 100644 --- a/src/initscripts/packages/libvirtd +++ b/src/initscripts/packages/libvirtd @@ -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)