NVIDIA / kubevirt-gpu-device-plugin

NVIDIA k8s device plugin for Kubevirt
BSD 3-Clause "New" or "Revised" License
233 stars 67 forks source link

Assigning a Single Physical GPU to Multiple VMs in KubeVirt #115

Closed tunahanertekin closed 1 month ago

tunahanertekin commented 1 month ago

Hi there,

I’m trying to assign a single physical GPU to multiple VMs.

Based on my research, GPU passthrough and vGPU software are the only methods available for enabling GPU acceleration in KubeVirt VMs. Since GPU passthrough doesn’t allow me to assign the same GPU to multiple VMs, vGPU seems to be my only option.

Are there any alternatives to vGPU that would allow me to achieve this? Is there another way to enable GPU usage across multiple VMs while maintaining a one-to-many relationship between a physical GPU and VMs?

Thanks in advance!

rthallisey commented 1 month ago

vGPUs were designed specifically for sharing the entire GPU with multiple vms. I'm not aware of an alternative.

If you don't need to share the entire GPU, you can use Multi-Instance GPU (MIG) mode - https://www.nvidia.com/en-us/technologies/multi-instance-gpu/. That will provide hardware separation which can be partitions to multiple vms.