-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
📌 Task summary
Refactor the way cards and renders are assigned to container (and VMs maybe) trough /dev/dri/by-path/ directory
📋 Task details
I've recently been encountering issues with container initialization due to the absence of "card0" in /dev/dri. The specific error I'm encountering is:
TASK ERROR: Device /dev/dri/card0 does not exist
The root cause of this issue seems to be Proxmox's inconsistent assignment of the GPU, alternating between card0 and card1. After some troubleshooting, I discovered that the /dev/dri/by-path/ directory, which references GPUs by their PCI address, provides a more reliable solution. By adjusting the container configuration to search for the hardware location instead of relying on the card index (card0 or card1), I managed to resolve the issue.

Given this understanding, I propose that the Proxmox VM and container creation script be improved to support GPU identification by PCI address. This would enhance reliability in configuring GPU passthrough, especially in environments with multiple GPUs.
Additionally, it would be highly beneficial if the script allowed users to select which GPU they want to use during the creation of a new VM or container. This would provide extra flexibility and control, particularly on systems equipped with several graphics units.
Please consider these suggestions to enhance the robustness and functionality of the current script:
PCI Address Identification: Change the method of GPU identification to utilize the PCI address found in /dev/dri/by-path/.
User-Selectable GPU: Include an option in the script that allows users to specify which GPU should be used when creating a VM or container.
These improvements would not only resolve the current issue but also increase the flexibility and reliability of the VM and container creation process on Proxmox.