From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miguel Arruga Vivas Subject: bug#36634: Virtual Machine Manager (virt-manager) Date: Sun, 27 Oct 2019 10:37:19 +0100 Message-ID: <20191027103719.47a9f1ea@gmail.com> References: <20191021164629.5a0ae2e0@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/LB/pF=zqxf+lduGTw/ffBg=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44040) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOezs-00083R-7b for bug-guix@gnu.org; Sun, 27 Oct 2019 05:38:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOezq-0006K9-Tr for bug-guix@gnu.org; Sun, 27 Oct 2019 05:38:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOezq-0006K1-OU for bug-guix@gnu.org; Sun, 27 Oct 2019 05:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOezq-00081Z-Ip for bug-guix@gnu.org; Sun, 27 Oct 2019 05:38:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20191021164629.5a0ae2e0@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 36634@debbugs.gnu.org, Raghav Gururajan --MP_/LB/pF=zqxf+lduGTw/ffBg= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello again, The two patches attached create the cgroup directory needed and remove the warning for the ip binary missing. Still the following errors are emitted to the log. --------------------8<------------------- error : virConnectGetCPUModelNames:1109 : this function is not supported by the connection driver: virConnectGetCPUModelNames error : virConnectGetAllDomainStats:11705 : this function is not supported by the connection driver: virConnectGetAllDomainStats error : virCgroupSetValueRaw:473 : Unable to write to '/sys/fs/cgroup/unified/machine/qemu-1-Guix.libvirt-qemu/tasks': No such file or directory error : virCgroupRemoveRecursively:2383 : Unable to remove /sys/fs/cgroup/unified/machine/qemu-1-Guix.libvirt-qemu/ (16) -------------------->8------------------- The last two may indicate there may be lurking another bug in the cgroups configuration, but at least the machines can be created and started/stopped seamlessly. What do you think? Happy hacking! Miguel --MP_/LB/pF=zqxf+lduGTw/ffBg= Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-services-libvirtd-Create-required-control-groups.patch >From a5dd055ea0fc20420cca6df2d38302596d397c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sun, 27 Oct 2019 03:56:17 +0100 Subject: [PATCH 1/2] services: libvirtd: Create required control groups. * gnu/services/virtualization.scm (libvirt-shepherd-service) [libvirtd-activation]: New shepherd service. [libvirtd]: Add a requirement of the new service. --- gnu/services/virtualization.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index bc8ac9b40a..2f26945efd 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -428,8 +428,19 @@ potential infinite waits blocking libvirt.")) (let* ((config-file (libvirt-conf-file config)) (libvirt (libvirt-configuration-libvirt config))) (list (shepherd-service + ;; See https://libvirt.org/cgroups.html#currentLayoutGeneric + (documentation "Create the cgroup hierarchy required by libvirt.") + (provision '(libvirtd-activation)) + (requirement '(file-system-/sys/fs/cgroup)) + (one-shot? #t) + (start #~(lambda args + (let ((path "/sys/fs/cgroup/unified/machine")) + (or (access? path F_OK) (mkdir path))))) + (stop #~(lambda args #t))) + (shepherd-service (documentation "Run the libvirt daemon.") (provision '(libvirtd)) + (requirement '(libvirtd-activation)) (start #~(make-forkexec-constructor (list (string-append #$libvirt "/sbin/libvirtd") "-f" #$config-file) -- 2.23.0 --MP_/LB/pF=zqxf+lduGTw/ffBg= Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-services-libvirtd-Provide-ip-binary-at-runtime.patch >From 24f7c06a47562f410ceb982a3b2a0d44980de392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sun, 27 Oct 2019 03:59:23 +0100 Subject: [PATCH 2/2] services: libvirtd: Provide ip binary at runtime. * gnu/services/virtualization.scm (libvirt-shepherd-service): Add sbin to the PATH variable, as ip binary is installed there. --- gnu/services/virtualization.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 2f26945efd..488cd63041 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -444,9 +444,11 @@ potential infinite waits blocking libvirt.")) (start #~(make-forkexec-constructor (list (string-append #$libvirt "/sbin/libvirtd") "-f" #$config-file) + ;; For finding qemu and ip binaries. #:environment-variables - ;; For finding qemu binaries. - '("PATH=/run/current-system/profile/bin"))) + (list (string-append + "PATH=/run/current-system/profile/bin:" + "/run/current-system/profile/sbin")))) (stop #~(make-kill-destructor)))))) (define libvirt-service-type -- 2.23.0 --MP_/LB/pF=zqxf+lduGTw/ffBg=--