harvester / pcidevices

Manage PCI Devices and PCI Device Claims for PCI Passthrough in Harvester

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] KubeVirt Allow-list doesn't always get refreshed

tlehman opened this issue · comments

Changing the kubevirt list of permitted devices will trigger a change to the .status.allocatable value. If you add multiple identical devices, it only counts the first one. Also, if you remove the device, the allocatable list is not updated.

Proposed solution: remove the device and then re-add it, to trigger an update.

My proposed solution is to use PCIDevicePlugin and run our own KubeVirt device plugins, instead of messing with KubeVirt's config.

The lifecycle is similar (if not simpler) and it's fully aligned with KubeVirt's practices. Under the hood the device plugin injects an environment variable, into the virt-launcher pod, that specifies the PCI bus addresses for pass-through.

This will also allow us to control exactly which PCI devices are getting advertised (only the claimed ones) and which are not.

Now that 1.1.0 is out, I am going to implement this.