talos
talos copied to clipboard
GPU Passthrough
Feature Request
We want to use Talos on bare metal and in our use case, we run KubeVirt VMs on top of Talos that require GPU passthrough.
Description
To use GPUs in KubeVirt, we can either do virtual GPU (fractional) or full GPU via PCI passthrough. I don't see any documentation in Talos, on how to do this.
https://kubevirt.io/user-guide/virtual_machines/host-devices/
There is no specific guide for Talos Linux, but you can contribute one.
Some notes:
- adding extra kernel args in Talos Linux is handled either by:
- if booting from a disk image, pre-generating one via Image Factory with custom kernel args
- if booting from e.g. an ISO/PXE, putting extra args to
machine.install.extraKernelArgs
in the machine config - for existing nodes, via
machine.install.extraKernelArgs
followed by an upgrade (even to the same version)
- writing to
/sys
(sysfs) can be handled viamachine.sysfs
I successfully managed to use GPU passthrough with KubeVirt by setting:
machine:
install:
extraKernelArgs:
- amd_iommu=on
- vfio-pci.ids=1002:73bf
The procedure is the same as using any other Linux distro. The Arch wiki has a detailed article on the topic.
Thanks @smira and @DamiaPoquet