From: Karl Hallsby via Guix-patches via <guix-patches@gnu.org>
To: 75445@debbugs.gnu.org
Cc: "Karl Hallsby" <karl@hallsby.com>,
"Ludovic Courtès" <ludo@gnu.org>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: [bug#75445] [PATCH 7/7] services: Add xen-guest-agent-service-type.
Date: Wed, 8 Jan 2025 14:19:01 -0600 [thread overview]
Message-ID: <7945dde8e89d4efaf17b2ec64f7489631d0a0bab.1736366802.git.karl@hallsby.com> (raw)
In-Reply-To: <cover.1736366801.git.karl@hallsby.com>
* gnu/services/virtualization.scm (xen-guest-agent-configuration,
xen-guest-agent-service-type): New variables.
* doc/guix.texi: Document them.
Change-Id: Id1b1f4fc2b193d73f4401e74a214222dfe1b6ea7
---
doc/guix.texi | 24 +++++++++++++++++++++++
gnu/services/virtualization.scm | 34 ++++++++++++++++++++++++++++++++-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index ee827717a1..89f153146a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -37365,6 +37365,30 @@ Virtualization Services
@end table
@end deftp
+@code{xe-guest-utilities} is the standard guest utilities used for Xen
+guests. More recently the Xen Project has been working to develop
+@code{xen-guest-agent}, a modern drop-in replacement for
+@code{xe-guest-utilities}. While they nearly have feature-parity,
+@code{xen-guest-agent} currently lacks some of the features of its
+predecessor, namely disk metrics and ``PV drivers version''.
+
+@defvar xen-guest-agent-service-type
+Service type for the Xen guest agent service.
+@end defvar
+
+@deftp {Data Type} xen-guest-agent-configuration
+Configuration for the @code{xen-guest-agent} service.
+
+@table @asis
+@item @code{package} (default: @code{xen-guest-agent})
+The Xen guest agent package to use.
+@end table
+@end deftp
+
+@quotation Warning
+@code{xe-guest-utilities} and @code{xen-guest-agent} are mutually exclusive.
+@end quotation
+
@anchor{build-vm}
@subsubheading Virtual Build Machines
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 874abcd73f..b697ae9526 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -113,7 +113,9 @@ (define-module (gnu services virtualization)
qemu-guest-agent-service-type
xe-guest-utilities-configuration
- xe-guest-utilities-service-type))
+ xe-guest-utilities-service-type
+ xen-guest-agent-configuration
+ xen-guest-agent-service-type))
(define (uglify-field-name field-name)
(let ((str (symbol->string field-name)))
@@ -1083,6 +1085,36 @@ (define xe-guest-utilities-service-type
(default-value (xe-guest-utilities-configuration))
(description "Run the Xen guest management utilities.")))
+(define-configuration/no-serialization xen-guest-agent-configuration
+ (package
+ (package xen-guest-agent)
+ "Xen guest agent package."))
+
+(define (generate-xen-guest-agent-documentation)
+ "Generate documentation for xen-guest-agent-configuration fields"
+ (generate-documentation
+ `((xen-guest-agent-configuration ,xen-guest-agent-configuration-fields))
+ 'xen-guest-agent-configuration))
+
+(define (xen-guest-agent-shepherd-service config)
+ (list
+ (shepherd-service
+ (provision '(xen-guest-agent))
+ (requirement '(networking user-processes udev))
+ (documentation "Run the Xen guest management agent.")
+ (start #~(make-forkexec-constructor
+ (list #$(file-append xen-guest-agent "/bin/xen-guest-agent"))))
+ (stop #~(make-kill-destructor)))))
+
+(define xen-guest-agent-service-type
+ (service-type
+ (name 'xen-guest-agent)
+ (extensions
+ (list (service-extension shepherd-root-service-type
+ xen-guest-agent-shepherd-service)))
+ (default-value (xen-guest-agent-configuration))
+ (description "Run the Xen guest management utilities.")))
+
\f
;;;
;;; Secrets for guest VMs.
--
2.46.0
next prev parent reply other threads:[~2025-01-08 20:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 20:12 [bug#75445] [PATCH 0/7] Add xen-guest-agent and daemon Karl Hallsby via Guix-patches via
2025-01-08 20:18 ` [bug#75445] [PATCH 1/7] gnu: Add rust-uname-0.1 Karl Hallsby via Guix-patches via
2025-01-08 20:18 ` [bug#75445] [PATCH 2/7] gnu: Add rust-xenstore-sys-0.3 Karl Hallsby via Guix-patches via
2025-01-08 20:18 ` [bug#75445] [PATCH 3/7] gnu: Add rust-xenstore-sys-0.2 Karl Hallsby via Guix-patches via
2025-01-08 20:18 ` [bug#75445] [PATCH 4/7] gnu: Add rust-xenstore-rs-0.7 Karl Hallsby via Guix-patches via
2025-01-08 20:18 ` [bug#75445] [PATCH 5/7] gnu: Add rust-xenstore-rs-0.6 Karl Hallsby via Guix-patches via
2025-01-08 20:19 ` [bug#75445] [PATCH 6/7] gnu: Add xen-guest-agent Karl Hallsby via Guix-patches via
2025-01-08 20:19 ` Karl Hallsby via Guix-patches via [this message]
2025-01-09 15:10 ` [bug#75445] [PATCH 0/7] Add xen-guest-agent and daemon Efraim Flashner
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=7945dde8e89d4efaf17b2ec64f7489631d0a0bab.1736366802.git.karl@hallsby.com \
--to=guix-patches@gnu.org \
--cc=75445@debbugs.gnu.org \
--cc=karl@hallsby.com \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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).