unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Miguel Arruga Vivas <rosen644835@gmail.com>
To: 36634@debbugs.gnu.org, Raghav Gururajan <rvgn@disroot.org>
Subject: bug#36634: Virtual Machine Manager (virt-manager)
Date: Sun, 27 Oct 2019 10:37:19 +0100	[thread overview]
Message-ID: <20191027103719.47a9f1ea@gmail.com> (raw)
In-Reply-To: <20191021164629.5a0ae2e0@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

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

[-- Attachment #2: 0001-services-libvirtd-Create-required-control-groups.patch --]
[-- Type: text/x-patch, Size: 1744 bytes --]

From a5dd055ea0fc20420cca6df2d38302596d397c49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
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


[-- Attachment #3: 0002-services-libvirtd-Provide-ip-binary-at-runtime.patch --]
[-- Type: text/x-patch, Size: 1405 bytes --]

From 24f7c06a47562f410ceb982a3b2a0d44980de392 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
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


  reply	other threads:[~2019-10-27  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13  5:06 bug#36634: Virtual Machine Manager (virt-manager) Raghav Gururajan
2019-07-14 12:42 ` Efraim Flashner
2019-07-14 21:21   ` Raghav Gururajan
2019-07-21 17:23 ` Christopher Baines
2019-07-21 21:42   ` Raghav Gururajan
2019-09-23  4:14   ` Chris Marusich
2019-09-23  4:30     ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2019-10-05  5:41     ` Chris Marusich
2019-10-10  8:55       ` Chris Marusich
2019-07-25  9:46 ` bug#36634: ATTENTION REQUIRED Raghav Gururajan
2019-07-25 19:36   ` Tobias Geerinckx-Rice
2019-07-25 20:01     ` Tobias Geerinckx-Rice
2019-07-26  3:51       ` bug#36634: Raghav Gururajan
2019-07-26  3:47     ` bug#36634: Raghav Gururajan
2019-09-08 18:14 ` bug#36634: Virtual Machine Manager (virt-manager) Christopher Baines
2019-10-21 14:46 ` Miguel Arruga Vivas
2019-10-27  9:37   ` Miguel Arruga Vivas [this message]
2019-11-07  8:44     ` Chris Marusich
2019-11-08  0:53       ` Miguel Arruga Vivas
2020-03-19 10:06 ` bug#36634: (no subject) Brice Waegeneire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191027103719.47a9f1ea@gmail.com \
    --to=rosen644835@gmail.com \
    --cc=36634@debbugs.gnu.org \
    --cc=rvgn@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).