On 1/21/25 11:36, Dominik Csapak wrote:
mhmm not sure if it's so good to reuse the exiting name of the nvidia
service
for this. also not sure how systemd likes it if there is a service
'foo.service'
and a template '[email protected]' (though my guess would be that it's not
that big of an issue)
i'd like to seee a distinct name for this (maybe even with pve prefix)
like:
[email protected]
good point, will change that
Then it's clear where it comes from and what it's for (vgpud is an
nvidia daemon
that does not really has anything to do with what this does)
Or do you have any objections to that?
also, would it make sense to add a
---
ConditionPathExists=/usr/lib/nvidia/sriov-manage
---
too?
also good point, will add this as well
otherwise users that enable it accidentally or too early run into an
ugly error
(though that can be desired too)
On 1/21/25 11:04, Hannes Duerr wrote:
Signed-off-by: Hannes Duerr <[email protected]>
---
debian/[email protected] | 12 ++++++++++++
debian/rules | 3 +++
2 files changed, 15 insertions(+)
create mode 100644 debian/[email protected]
diff --git a/debian/[email protected] b/debian/[email protected]
new file mode 100644
index 0000000..b3c1220
--- /dev/null
+++ b/debian/[email protected]
@@ -0,0 +1,12 @@
+[Unit]
+Description=Enable NVIDIA SR-IOV for PCI ID %i
+After=network.target nvidia-vgpud.service nvidia-vgpu-mgr.service
+Before=pve-guests.service
+
+[Service]
+Type=oneshot
+ExecStartPre=/bin/sleep 5
+ExecStart=/usr/lib/nvidia/sriov-manage -e %i
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index 218df65..fe9a05d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,3 +6,6 @@
%:
dh $@
+
+override_dh_installsystemd:
+ dh_installsystemd --no-start --no-enable --name nvidia-vgpud@
[email protected]
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel