siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.39k stars 514 forks source link

GPU Passthrough #8656

Open anjuls opened 4 months ago

anjuls commented 4 months ago

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/

smira commented 4 months ago

There is no specific guide for Talos Linux, but you can contribute one.

Some notes:

DamiaPoquet commented 4 months ago

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.

anjuls commented 4 months ago

Thanks @smira and @DamiaPoquet