sriov-network-device-plugin icon indicating copy to clipboard operation
sriov-network-device-plugin copied to clipboard

Add ability to select devices based on NIC names

Open ian-howell opened this issue 3 years ago • 7 comments

What would you like to be added?

I would like to be able to create configmaps which allow for the sriov-device-plugin to select NICs based on their names, e.g.

{
    "resourceList": [{
            "resourceName": "sriov_netdevice",
            "selectors": {
                "nicNames": ["net1", "net2"]
            }
        }
}

What is the use case for this feature / enhancement?

This is useful when creating a device in libvirt, as the targets for the current selectors are unknown at VM creation time.

ian-howell avatar Jun 27 '22 22:06 ian-howell

Hi @ian-howell can you explain the use-case a bit more?

for virtual environments we mainly use pciAddresses will that cover your use-case?

SchSeba avatar Jul 05 '22 16:07 SchSeba

I'm generating the SRIOV-DP configmap prior to the creation of any VMs. In my case, I'm creating a VM template which is then used by kubevirt to later generate the actual VM. Even though I could specify a pci address for the device in the template, libvirt doesn't guarantee that the resulting device will actually get that address (libvirt docs). However, that isn't the case for other device info such as NIC name or MAC address

ian-howell avatar Jul 06 '22 21:07 ian-howell

@SchSeba Any updates on this?

ian-howell avatar Jul 12 '22 16:07 ian-howell

@ian-howell Thanks for the info!

SchSeba avatar Jul 13 '22 12:07 SchSeba

Hi @ian-howell

can you please have a look on this links and let me know if that solve your use case

https://kubevirt.io/user-guide/virtual_machines/interfaces_and_networks/ https://github.com/kubevirt/kubevirt/blob/main/docs/sriov.md https://dougbtv.com/nfvpe/2019/05/15/kubevirt-sriov/

SchSeba avatar Jul 26 '22 13:07 SchSeba

Hi @ian-howell can we close this isse?

SchSeba avatar Aug 11 '22 15:08 SchSeba

Hey @SchSeba, after some investigation, I've found that the pfNames selector isn't sufficient for our use cases. I need to be able to target the device as it is named within the VM.

ian-howell avatar Aug 11 '22 16:08 ian-howell

closing this one as we implement the ACPI instead https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/pull/488

SchSeba avatar Dec 21 '23 07:12 SchSeba