diff options
| author | Edouard Klein <edk@beaver-labs.com> | 2026-04-28 13:30:38 +0200 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-05-06 15:42:59 +0900 |
| commit | 16f9d0985fc73dbe2d922e0921d910d8a89b7a3f (patch) | |
| tree | 93fffef45f946ea8fef90642fc3baf7f8747afaf /gnu/services | |
| parent | 8f1f7b614a6334a7ee196b83582cb3230761a33e (diff) | |
services: libvirt: Add Shepherd reload action.
* gnu/services/virtualization.scm (libvirt-shepherd-service):
Add a reload action that sends SIGHUP to libvirtd.
Change-Id: Ie424dcc45dc0e93a979a0a8b7e680c28bf4ea387
Merges: https://codeberg.org/guix/guix/pulls/8204
Reviewed-by: Maxim Cournoyer <maxim@guixotic.coop>
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'gnu/services')
| -rw-r--r-- | gnu/services/virtualization.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 7d15abaf619..c6bf5360a6d 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm | |||
| @@ -532,7 +532,16 @@ avoid potential infinite waits blocking libvirt.")) | |||
| 532 | (string-append | 532 | (string-append |
| 533 | "LINUX_MODULE_DIRECTORY=" | 533 | "LINUX_MODULE_DIRECTORY=" |
| 534 | "/run/booted-system/kernel/lib/modules")))) | 534 | "/run/booted-system/kernel/lib/modules")))) |
| 535 | (stop #~(make-kill-destructor)))))) | 535 | (stop #~(make-kill-destructor)) |
| 536 | (actions | ||
| 537 | (list (shepherd-signal-action | ||
| 538 | 'reload SIGHUP | ||
| 539 | #:documentation "Send a @code{SIGHUP} signal | ||
| 540 | to @command{libvirtd} to reload its configuration (both its configuration file, | ||
| 541 | and the content of @file{/etc/libvirtd}, in which live the XML files | ||
| 542 | that define e.g. the VMs and their network)." | ||
| 543 | #:message "Service libvirtd has been asked \ | ||
| 544 | to reload its configuration."))))))) | ||
| 536 | 545 | ||
| 537 | (define (/etc/qemu/firmware config) | 546 | (define (/etc/qemu/firmware config) |
| 538 | (let ((firmwares (libvirt-configuration-firmwares config))) | 547 | (let ((firmwares (libvirt-configuration-firmwares config))) |
