Could someone please help me get NVIDIA MIG GPUs working with incus? Is there a guide for this anywhere? I’d be happy to help write it if someone helps get me going. I have to say that I don’t think the incus docs for adding GPU devices are very good, mainly because no examples are given. Example commands would help a lot because the commands for adding devices to incus are long and not very intuitive.
I should also add that I have previously got NVIDIA MIG passthrough working on this same machine but using proxmox VE instead of incus and I’ve also had been able to get PCI passthrough of nvidia (non-MIG) GPUs working under incus so I’m not a total beginner here but there are still so many moving parts involved here, this really needs a guide writing. I’d prefer to use incus instead of proxmox-ve hence this post.
My host machine is running proxmox 9.1 but with proxmox VE removed and incus installed from the Debian 13 repos. The container I’m trying to get working with a MIG GPU is running Ubuntu 24.04.
On the host proxmox machine which has several A100s I have installed the latest CUDA libraries, the nvidia non-free driver, the cuda driver and the nvidia container toolkit. I have also install nvidia-mig-manager and I have several MIG devices showing as being configured under nvidia-smi.
I have run the commands
nvidia-smi -pm 1
and
nvidia-smi mig 1
On the host to make sure my mig GPUs are enabled. I am using the same mig-parted & mig-manager config as worked for me with proxmox-ve so that shouldn’t be the issue here.
I created my Ubuntu 24.04 container (which I had to disable apparmor on to get to start) using a command like this:
incus launch images:ubuntu/24.04 test -c nvidia.runtime=true
I configured its network interface, updated all the packages and then I installed the CUDA libraries but not the driver in the container. Do we need to install the cuda libraries into each container using CUDA or does -c nvidia.runtime=true make that unneccessary? I tried both and cannot get my container to start when it has a MIG GPU attached.
I checked I could start my container without the GPU attached first then I used:
nvidia-smi -L
To find out the UUID of one of my MIG GPUs and then I used a command like this to add it to my container:
incus config device add test gpu0 gpu gputype=mig mig.uuid=MIG-6d3ade01-c380-5acf-a5ac-4a83120f1c02
Device gpu0 added to test
incus start test
Error: Failed to start device “gpu0”: Card isn’t a NVIDIA GPU or driver isn’t properly setup
Try `incus info --show-log test` for more info
incus info --show-log test
Name: test
Description:
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2025/12/17 16:07 GMT
Last Used: 2025/12/18 17:47 GMT
Obviously there’s a lot more config details I could provide here but I wanted to try and keep this post as short as I could make it so I’ve only mentioned the key details. If any more details are needed then I’m happy to provide them.
Thanks