NVIDIA GPU passthrough to an Edera zone
This guide shows how to passthrough an NVIDIA GPU to an Edera zone using protect, load the NVIDIA driver, and run a GPU-accelerated workload inside the zone.
Getting Started
Edera must be successfully installed. See our installation guides, which should also include making sure you have access to the Edera image registry.
Find the GPUs on your host.
Supported GPUs, like the Tesla, should show up in the output of
lspci:sudo lspci -Dknn -d ::03xxExample output:
0000:18:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [10de:1eb8] (rev a1) Subsystem: NVIDIA Corporation Device [10de:12a2]Make note of the PCI ids at the front (like
0000:18:00.0) for the next step.Add your GPUs to the Protect demon’s config file.
This tells Edera which GPUs are available for passthrough and names them:
# /var/lib/edera/protect/daemon.toml [pci.devices] [pci.devices.gpu0] locations = [ "0000:18:00.0", ] permissive = true msi_translate = false power_management = true rdm_reserve_policy = "relaxed"The key
gpu0is the primary identifier for the GPU in Edera. It links the physical device to the zone and workload later via--device gpu0. Although we only show one GPU here, if you have multiple GPUs you will need a block for each GPU you want to pass through and each will need a unique name. We recommend numbering them gpu0, gpu1, gpu2 and so on, but you can choose any name here (for exampletestcard,leftcard), but it must be unique and must match the name used later in your launch commands.Optionally check the
nvidiakernel variant defined in the daemon config file.By default each Edera release ships an
nvidiakernel variant, which is pre-defined in the daemon config file. This lets you launch a zone with--kernel-variant nvidiaand Edera will resolve the correct images for you. Typically you shouldn’t need to modify this, but if you do see Selecting a zone kernel with variants for more details.# /var/lib/edera/protect/daemon.toml [zone.kernel-variants] nvidia = "ghcr.io/edera-dev/zone-nvidiagpu-kernel:6.18.38-nvidia-610.43.02@sha256:dc968f8664d41abb75e44aa7bb3eb12e02d928c1358e5f1a8435c51d1d30f239"Restart the Protect daemon and verify.
If you made any changes to the
daemon.tomlfile, restart the daemon (sudo systemctl restart protect-daemon).If you changed the kernel variant configs, confirm the variant is resolvable with
sudo protect image list-kernel-variants.Additional Steps if using KVM
When using GPU passthrough with KVM as the hypervisor, the GPU must first be bound to the VFIO driver before Edera can attach it to a zone.
Ensure that no other driver has grabbed the GPU:
Similar to above, run
sudo lspci -Dknn -d ::03xxand locate the GPUs. They should still not display aKernel driver in use:field. Make note of the PCI Vendor and Device ids that look like[10de:1eb8]for use in the next step.Configure module parameters for the VFIO kernel modules:
Use the PCI vendor and device IDs for the card from the previous step. You don’t need to list the IDs for ‘Subsystems’. If you need to support multiple PCI IDs, separate them by commas.
# /etc/modprobe.d/gpu-vfio.conf (new file) options vfio_iommu_type1 allow_unsafe_interrupts options vfio_pci ids=10de:1eb8Enable automatic loading of the VFIO kernel modules on boot:
# /etc/modules-load.d/gpu-vfio.conf (new file) vfio_iommu_type1 vfio_pciReboot the system or (re-)load the VFIO kernel modules:
sudo modprobe -r vfio_pci sudo modprobe -r vfio_iommu_type1 sudo modprobe vfio_iommu_type1 sudo modprobe vfio_pciConfirm that the GPUs are successfully bound to the
vfio-pcidriver:sudo lspci -Dknn -d ::03xx... 0000:18:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [10de:1eb8] (rev a1) Subsystem: NVIDIA Corporation Device [10de:12a2] Kernel driver in use: vfio-pci 0000:19:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [10de:1eb8] (rev a1) Subsystem: NVIDIA Corporation Device [10de:12a2] Kernel driver in use: vfio-pci ...
Launch a zone with NVIDIA GPU passthrough
sudo protect zone launch --name zone-gpu \
--device gpu0 \
--kernel-verbose \
--target-memory 2048 \
--resource-adjustment-policy static \
--kernel-variant nvidia \
--pull-overwrite-cacheExplanation:
--name zone-gpu: name of the zone--device gpu0: This is the name you gave the GPU in the daemon.toml file aspci.devices.gpu0--target-memory 2048: allocates 2 GiB memory to the zone--resource-adjustment-policy static: prevents zone RAM from being dynamically resized--kernel-variant nvidia: use the kernel image variant which includes NVIDIA drivers for the zone--pull-overwrite-cache: overwrite image cache on pull
Check that the zone launched successfully:
sudo protect zone listExpected output:
| name | uuid | state | ipv4 | ipv6 |
|----------|---------------------------------------|-------|--------------|------------------------------|
| zone-gpu | 994d83fd-dc41-4b6d-98a9-6a89ad9b45cf | ready | 10.75.0.2/16 | fdd4:1476:6c7e::2/48 |Confirm the NVIDIA driver is loaded
Check the zone logs:
sudo protect zone logs zone-gpuExpected output:
[2026-07-16T16:32:21.011030Z INFO edera_protect_zone::hooks] running setup hook: load modules [nvidia, nvidia_drm, nvidia_uvm] and execute [/usr/bin/nvidia-smi, -pm, 1]
[ 1.403876] nvidia: loading out-of-tree module taints kernel.
[ 1.515369] nvidia-nvlink: Nvlink Core is being initialized, major device number 239
[ 1.516039]
[ 1.568563] NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64 610.43.02 Release Build (build@01c4f9ab348e) Mon Jul 13 01:02:13 UTC 2026
[ 1.619087] nvidia-modeset: Loading NVIDIA UNIX Open Kernel Mode Setting Driver for x86_64 610.43.02 Release Build (build@01c4f9ab348e) Mon Jul 13 01:02:08 UTC 2026
[ 1.676402] [drm] [nvidia-drm] [GPU ID 0x00000007] Loading driver
[ 3.362604] [drm] Initialized nvidia-drm 0.0.0 for 0000:00:07.0 on minor 0Run a GPU workload
Launch a workload with the NVIDIA GPU:
sudo protect workload launch --name workload-gpu \
--zone zone-gpu \
--privileged \
nvidia/cuda:13.3.0-devel-ubuntu26.04 -- /bin/bashCheck it’s running:
sudo protect workload listExpected output:
| name | uuid | zone | state |
|---------------|----------------------------------------|----------------------------------------|---------|
| workload-gpu | dcb4944a-9bd9-4f22-b075-a22e3ceb0fd0 | 994d83fd-dc41-4b6d-98a9-6a89ad9b45cf | running |Verify that the GPU is visible to the workload and has the nvidia driver loaded:
sudo protect workload exec workload-gpu -- \
/bin/bash -c 'DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y pciutils && lspci -Dknn'Expected output:
...
0000:00:07.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [10de:1eb8] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:12a2]
Kernel driver in use: nvidia
...Verify GPU access via nvidia-smi:
sudo protect workload exec workload-gpu nvidia-smiExpected output:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 610.43.02 KMD Version: 610.43.02 CUDA UMD Version: 13.3 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 Tesla T4 On | 00000000:00:07.0 Off | 0 |
| N/A 32C P8 11W / 70W | 0MiB / 15360MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+Success. We’ve configured the GPU and have launched a workload in an isolated zone.
Cleanup
sudo protect workload destroy workload-gpu
sudo protect zone destroy zone-gpuNext steps
You’ve successfully launched an NVIDIA GPU-enabled Edera zone. You can now run secure, high-performance AI workloads in hardened zones with native driver support.