Signed-off-by: Hannes Duerr <h.du...@proxmox.com>
---
 debian/pve-nvidia-sriov@.service | 13 +++++++++++++
 debian/rules                     |  3 +++
 2 files changed, 16 insertions(+)
 create mode 100644 debian/pve-nvidia-sriov@.service

diff --git a/debian/pve-nvidia-sriov@.service b/debian/pve-nvidia-sriov@.service
new file mode 100644
index 0000000..3706d04
--- /dev/null
+++ b/debian/pve-nvidia-sriov@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Enable NVIDIA SR-IOV for PCI ID %i
+ConditionPathExists=/usr/lib/nvidia/sriov-manage
+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..d5fe1f6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,3 +6,6 @@
 
 %:
        dh $@
+
+override_dh_installsystemd:
+       dh_installsystemd --no-start --no-enable --name pve-nvidia-sriov@ 
pve-nvidia-sriov@.service
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to