From: Markus Frank <m.frank@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server v13 1/5] query-machine-capabilities: add systemd service file
Date: Mon, 18 Nov 2024 12:16:56 +0100 [thread overview]
Message-ID: <20241118111700.110077-2-m.frank@proxmox.com> (raw)
In-Reply-To: <20241118111700.110077-1-m.frank@proxmox.com>
Add a systemd service that runs the query-machine-capabilities binary
at boot time to ensure that the machine capabilities are stored in the
host-hw-capabilities.json file.
Signed-off-by: Markus Frank <m.frank@proxmox.com>
---
query-machine-capabilities/Makefile | 2 ++
.../query-machine-capabilities.service | 13 +++++++++++++
2 files changed, 15 insertions(+)
create mode 100644 query-machine-capabilities/query-machine-capabilities.service
diff --git a/query-machine-capabilities/Makefile b/query-machine-capabilities/Makefile
index 469c69ff..42372370 100644
--- a/query-machine-capabilities/Makefile
+++ b/query-machine-capabilities/Makefile
@@ -1,6 +1,7 @@
DESTDIR=
PREFIX=/usr
BINDIR=${PREFIX}/libexec/qemu-server
+SERVICEDIR=/lib/systemd/system
CC ?= gcc
CFLAGS += -O2 -fanalyzer -Werror -Wall -Wextra -Wpedantic -Wtype-limits -Wl,-z,relro -std=gnu11
@@ -12,6 +13,7 @@ query-machine-capabilities: query-machine-capabilities.c
install: query-machine-capabilities
install -d ${DESTDIR}/${BINDIR}
install -m 0755 query-machine-capabilities ${DESTDIR}${BINDIR}
+ install -m 0644 query-machine-capabilities.service ${DESTDIR}${SERVICEDIR}
.PHONY: clean
clean:
diff --git a/query-machine-capabilities/query-machine-capabilities.service b/query-machine-capabilities/query-machine-capabilities.service
new file mode 100644
index 00000000..d9830a9d
--- /dev/null
+++ b/query-machine-capabilities/query-machine-capabilities.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=PVE Query Machine Capabilities
+RequiresMountsFor=/run
+Before=pve-ha-lrm.service
+Before=pve-guests.service
+
+[Service]
+ExecStart=/usr/libexec/qemu-server/query-machine-capabilities
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2024-11-18 11:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 11:16 [pve-devel] [PATCH qemu-server/docs/manager v13 0/5] AMD SEV Markus Frank
2024-11-18 11:16 ` Markus Frank [this message]
2024-11-18 11:16 ` [pve-devel] [PATCH qemu-server v13 2/5] config: add AMD SEV support Markus Frank
2024-11-18 11:16 ` [pve-devel] [PATCH qemu-server v13 3/5] migration: add check_non_migratable_resources function Markus Frank
2024-11-18 11:16 ` [pve-devel] [PATCH docs v13 4/5] add AMD SEV documentation Markus Frank
2024-11-18 14:34 ` Shannon Sterz
2024-11-18 11:17 ` [pve-devel] [PATCH manager v13 5/5] ui: add AMD SEV configuration to Options Markus Frank
2024-11-18 14:38 ` Shannon Sterz
2024-11-18 21:16 ` [pve-devel] applied-series: [PATCH qemu-server/docs/manager v13 0/5] AMD SEV Thomas Lamprecht
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241118111700.110077-2-m.frank@proxmox.com \
--to=m.frank@proxmox.com \
--cc=pve-devel@lists.proxmox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.