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 <[email protected]> --- 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/[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..f2e4c83 --- /dev/null +++ b/debian/[email protected] @@ -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@ [email protected] -- 2.39.5 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
