Assign fractional NVIDIA vGPU to LXD VM running Ubuntu Server

I’m running LXD on Ubuntu 22.04 on an Intel 6-core system with 32 GB of RAM and an NVIDIA GeForce GTX 1080. I’d like to create an LXD VM running Ubuntu 22.04 that shares access to the single GPU in the server. Is this possible to do without licensing NVIDIA GRID?

I’m just a homelab user, not an enterprise user, so I obviously cannot pay for expensive licensing just to enable this feature.

The only other post I found that mentions this is: vGPU passthrough in LXD VM - #2 by stgraber

No, this is not available on consumer grade GPUs.

1 Like

Is container a solution for you ? With LXD, you can share the GPU device with your host machine and between multiple containers. It doesn’t require GRID license since it’s just a device “displaying” in your /dev directory.

LXD and NVIDIA GPUs

There is a project called vgpu_unlock that might solve your problem. Once configured, you will be able to share your gpu with the LXD virtual machines.
I’ll leave some links that may help you.

https://github.com/DualCoder/vgpu_unlock

https://gitlab.com/polloloco/vgpu-proxmox

https://www.michaelstinkerings.org/using-vgpu-unlock-with-proxmox-7/

https://www.youtube.com/watch?v=DxZ4wcPIXu8

1 Like

I already use containers with GPUs. I was hoping that I could also create virtual machines with LXD, and share the GPU.