GNU bug report logs - #77004
[PATCH] gnu: libvirt: Fix path to Linux modules

Previous Next

Package: guix-patches;

Reported by: nathan <nathan_mail <at> nborghese.com>

Date: Fri, 14 Mar 2025 01:17:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: nathan <nathan_mail <at> nborghese.com>
Cc: 77004 <at> debbugs.gnu.org
Subject: [bug#77004] [PATCH] gnu: libvirt: Fix path to Linux modules, [PATCH] gnu: libvirt: Fix path to Linux modules
Date: Sun, 16 Mar 2025 22:14:47 +0900
Hi Nathan,

nathan <nathan_mail <at> nborghese.com> writes:

> libvirt needs to load a file that is inside the modules folder.
> Fix the path
> Nix has a similar fix https://github.com/NixOS/nixpkgs/pull/286985
>
> From f3317c91eb469ff54e31b0fafd45e2070a1bb06a Mon Sep 17 00:00:00 2001
> Message-ID: <f3317c91eb469ff54e31b0fafd45e2070a1bb06a.1741914564.git.nathan_mail <at> nborghese.com>
> From: nathan <nathan_mail <at> nborghese.com>
> Date: Thu, 13 Mar 2025 20:36:27 -0400
> Subject: [PATCH] gnu: libvirt: Fix path to Linux modules
>
> * gnu/packages/virtualization.scm (libvirt): Use LINUX_MODULE_DIRECTORY to
> find modules.
> [source]: Add libvirt-respect-modules-path.patch
> * gnu/packages/patches/libvirt-respect-modules-path.patch: new file
> * gnu/local.mk: Register new file
> * gnu/services/virtualization.scm (libvirt-shepherd-service)
> <#:environment-variables>: pass LINUX_MODULE_DIRECTORY

LGTM.

[...]

> @@ -508,11 +508,13 @@ (define (libvirt-shepherd-service config)
>                       (list (string-append #$libvirt "/sbin/libvirtd")
>                             "-f" #$config-file
>                             #$@(if listen-tcp? '("--listen") '()))
> -                     ;; For finding qemu and ip binaries.
> +                     ;; For finding qemu, ip binaries, and kernel modules
>                       #:environment-variables
> -                     (list (string-append
> -                            "PATH=/run/current-system/profile/bin:"
> -                            "/run/current-system/profile/sbin"))))
> +                     (list
> +                      (string-append
> +                       "PATH=/run/current-system/profile/bin:"
> +                       "/run/current-system/profile/sbin")
> +                      "LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules")))

I suppose only modules from the booted kernel makes sense to be used,
hence the /run/booted-system instead of /run/current-system as Nix uses?

-- 
Thanks,
Maxim




This bug report was last modified 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.