we are trying to present NVIDIA L4 GPU as vGPUs to...
# harvester
p
we are trying to present NVIDIA L4 GPU as vGPUs to harvester nodes so that VMs and RKE2 clussters on harvester can use GPUs. We were able to download nvidia drivers using trail license and deploy them on harvester. But now when we attach the vGPUs to VMs in harvester they can go into a loop (start and off) when we poweron. The events (attached image) show us connection refused errors related fds. Anyone got a similar issue while presenting GPUs to harvester VMs?
b
I've never had luck with the vGPU stuff. I've always stuck to pcie passthrough to get it to the VM. Personally I'd recommend pcie passthrough to a VM and do a custom cluster, or I'd set them up as elemental nodes if you need scaling or something automated.
t
Make sure you are using v1.8.2 or v1.7.3. there have been a lot of pci/vgpu fixes…
b
Also great advice
p
@bland-article-62755 we did try passthrough but then VMs can't share the GPU resources thus limiting the virtualization capabilities.
Let me try to go to v1.7.3 and check. But I want to understand if this error is related to something wrong I did.
b
Granted, it's been a while since I checked, but you couldn't do something like a live migration with vgpu. So once the machine was up, it was stuck on that node anyways and practically there was no way to keep a workload up with vGPU vs passthough. We figured that if a VM had an entire card would could still do timesharing or split it up at that level vs Hypervisor. We're still dogfooding it but having 1 node per card as a VM in a cluster gets us a lot of the flexibility we actually needed. Not trying to say our solution will work for you, it's just where we ended up because the vGPU at the hypervisor level ended up being less shiny or stable compared to what we needed at our scale.
p
I need to test the migration also. For us it is due to this bug. we did to 17.3 but that didnt fix then fix in this one helped but I guess we have to upgrade to 1.8.x now. github.com/harvester/harvester/issues/9399
👍 1
b
I asked the old AI slop:
Copy code
KubeVirt explicitly documents that VMs using VFIO devices (which is how vGPUs are typically exposed via vGPU device plugins or SR-IOV) are not live-migratable.
The VirtualMachine spec has no knob to "make" a vGPU migratable; the limitation is at the hypervisor/device level, not KubeVirt-specific.
If you use NVIDIA vGPU with the KubeVirt GPU device plugin, the resulting VM will have a vfio device, and KubeVirt's migration preconditions will mark it non-migratable.
and
Copy code
Why vGPU Live Migration Fails in KubeVirtHostdev Passthrough Limitations: KubeVirt exposes vGPUs to VMs as mediated devices (mdev) via PCI passthrough (VFIO). The KubeVirt controller inherently flags any VM with a hostdev attachment (including vGPUs and SR-IOV network cards) as LiveMigratable=False.  State Serialization: Standard live migration copies RAM and CPU state to the target host. KubeVirt cannot serialize the live memory and processing state held on the physical GPU hardware to stream it between the source virt-launcher pod and the destination pod.Pod Architecture: Live migration in KubeVirt works by spinning up a new target pod, streaming state to it, and switching execution over. Safely transferring a live slice of physical GPU hardware between two isolated container namespaces without guest OS disruption is a technical hurdle KubeVirt has not yet solved.
Which tracks with what I remember, but who knows.
Acutally the docs specifically mention vGPU being a blocker for live migration. So it sounds like unless you need that cuda and memory dedication at a smaller level for the VM vGPU doesn't gain you much ?
Actually that's not true, its possible it's better if you have a wide range of cards and need standard 16Gi or 8Gi chunks or something and your workflow is bringing up or tearing down VMs a lot.
👍 1
g
would be nice to have a support bundle so we can check the full pod logs etc
if hostname contains
.
because you are using fqdn node names then this will likely be the issue.. and you will need to move to v1.8.2