all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Duerr <h.duerr@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-nvidia-vgpu-helper v5 4/4] debian: add and install pve-nvidia-sriov systemd template unit file
Date: Thu, 13 Feb 2025 09:15:15 +0100	[thread overview]
Message-ID: <20250213081516.16266-5-h.duerr@proxmox.com> (raw)
In-Reply-To: <20250213081516.16266-1-h.duerr@proxmox.com>

SR-IOV must be enabled each time the system is restarted.
This systemd service should take over this task and enable SR-IOV per
pci-id/gpu after a system restart.

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
---

Notes:
    Changes in v4:
    * Change nvidia-vgpud.service nvidia-vgpu-mgr.service to `Before=`
      targets and remove the 5 seconds sleep in `ExecStartPre=` because it
      is not needed anymore

 debian/pve-nvidia-sriov@.service | 12 ++++++++++++
 debian/rules                     |  3 +++
 2 files changed, 15 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..f2e4c83
--- /dev/null
+++ b/debian/pve-nvidia-sriov@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Enable NVIDIA SR-IOV for PCI ID %i
+ConditionPathExists=/usr/lib/nvidia/sriov-manage
+After=network.target 
+Before=pve-guests.service nvidia-vgpud.service nvidia-vgpu-mgr.service
+
+[Service]
+Type=oneshot
+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


  parent reply	other threads:[~2025-02-13  8:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13  8:15 [pve-devel] [PATCH manager/nvidia-vgpu-helper v5 0/5] reduce setup steps for nvidia vgpu drivers Hannes Duerr
2025-02-13  8:15 ` [pve-devel] [PATCH pve-nvidia-vgpu-helper v5 1/4] create a debian package to make the installation of Nvidia vGPU drivers more convenient Hannes Duerr
2025-02-13  8:15 ` [pve-devel] [PATCH pve-nvidia-vgpu-helper v5 2/4] debian/control: add dependency for helper script Hannes Duerr
2025-02-13  8:15 ` [pve-devel] [PATCH pve-nvidia-vgpu-helper v5 3/4] add pve-nvidia-vgpu-helper and Makefile to make dependency installation more convenient Hannes Duerr
2025-02-13  8:15 ` Hannes Duerr [this message]
2025-02-13  8:15 ` [pve-devel] [PATCH pve-manager v5 1/1] debian/control: add pve-nvidia-vgpu-helper as dependency Hannes Duerr
2025-02-18 13:50 ` [pve-devel] applied-series: [PATCH manager/nvidia-vgpu-helper v5 0/5] reduce setup steps for nvidia vgpu drivers 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=20250213081516.16266-5-h.duerr@proxmox.com \
    --to=h.duerr@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal