Switch GPU instance to VM with PCI passthrough #57
No reviewers
Labels
No labels
IaC
admin
agent-containers
automation
blockchain
cleanup
data
documentation
hardware
hotfix
infrastructure
maintenance
metrics
ml
monitoring
networking
resilience
security
tailscale
trading
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midwitmoneymgmt/m3-infra!57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "gpu-vm-passthrough"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
IncusOS gpu-support doesn't bundle NVIDIA kernel modules or userspace (incus-os #992). Container GPU passthrough (
nvidia.runtime=true) has nothing to work with — no/dev/nvidia*nodes, no nvidia-smi, no libcuda.VMs bypass this entirely: raw PCI passthrough gives the VM direct hardware access. The VM loads its own NVIDIA driver.
Changes
nixos-image.tf
incus_image.nixos_unstable_vm(VM variant of NixOS/unstable)gpu.tf
type:container→virtual-machineimage: container image → VM imageprofiles:["default"]only (nixos-container profile is container-specific)nvidia.runtime: removed (VM loads its own driver)gpu.pci: set to0000:01:00.0(specific PCI passthrough)Plan
Terraform will destroy the existing container and create a new VM. The
gpu-datavolume onm3-trade-poolpersists.Post-merge
The VM will boot with raw GPU access. Install NVIDIA driver inside the VM's NixOS config to get nvidia-smi and CUDA working.
assigned to @AlexCaswen
approved this merge request
mentioned in commit
65e3bf3be7