Support NVIDIA GRID drivers for vGPU (Guest/Host)

This isn’t really a feature request that pops up often but it has been lingering in the background for a long time now from what I’ve seen, such as Jira ticket NAS-124880 alongside some random google-indexed discussions.

Problem/Justification
Ability to use NVIDIA GPU virtualization (vGPU) in TrueNAS scale. From a vGPU host perspective it would allow a single GPU to be split to multiple VMs. From a guest perspective it would allow TrueNAS to be run in a VM with hardware acceleration for apps while not requiring to hog the entire host GPU via passthrough.

Impact
Would allow for more efficient use of resources in deployments with hardware acceleration or homelabs.

How though?
Here I suppose comes the issue with GRID driver licensing, since it isn’t a publicly obtainable driver, so I’m not sure if it can just outright be included in TrueNAS. I suppose the better way would be to add a mechanism to easily allow the user to install the GRID driver - keep in mind this would require compiling DKMS in TrueNAS alongside pinning the system to a specific kernel version, since the GRID drivers can be quite picky. I suppose this could actually be merged with the recent “Enable GPU Legacy Drivers” feature request using the “pluggable” driver system as mentioned in that feature request.
Also worth pointing out that the GRID Guest and Host drivers are separate blobs, so again allowing the user to just install the off-the-shelf driver that they need would likely be the best. Biggest issue is actually building the driver in TrueNAS and the kernel versioning, since the GRID driver is based on the stable Quadro branch which sees rather infrequent releases.

Note that I am not suggesting the ability to use stuff like vgpu_unlock, that should remain unsupported and for people to hack in on their own, but having the GPUs that support vGPU natively work in TrueNAS would be a huge bonus.

2 Likes