fwiw – passing the device without type=nic and network=... works fine even though the device doesn’t show up as network device in sunstone. I can live with that but I liked it better by seeing the device as nic.
When you updated from 5.10 to 5.12 the configuration files: /var/lib/one/remotes/etc/im/kvm-probes.d/pci.conf and /etc/libvirt/qemu.conf were overwritten with the default values.
As a result the PCI DEVICES are not monitored. You can check it with onehost show <HOST_ID>.
If you have configured a PCI passthrough NIC, and the PCI device is not available, OpenNebula configures an interface of type bridge and model virtio because the network driver used is ‘dummy’. Then, as the ‘srviov’ does not exist and driver is ‘dummy’ (OpenNebula does not create the bridge if not exist), you get the error: error: Cannot get interface MTU on 'sriov': No such device.
To solve this issue, restore your previous configuration in /etc/libvirt/qemu.conf [0] (restart livirtd service), and /var/lib/one/remotes/etc/im/kvm-probes.d/pci.conf [1] (restart opennebula and run onehost forceupdate). After that, try to instantiate the template again.
thanks for your answer. The kvm-probes.d/pci.conf is still the previous “working” one, it has not been overwritten by the package (the files are marked %config(noreplace) in the rpm) and would have been restored on my next ansible run.
I see all pci devices with onehost show and I can assign them directly to the virtual machines, simply not as TYPE = "NIC":
PCI DEVICES
VM ADDR TYPE NAME
03:00.0 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
03:00.1 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
85:00.0 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
85:00.1 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
85:00.2 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
85:00.3 1077:8070:0200 FastLinQ QL41000 Series 10/25/40/50GbE Controller
84 85:02.0 1077:8090:0200 FastLinQ QL41000 Series Gigabit Ethernet Controlle
84 85:02.1 1077:8090:0200 FastLinQ QL41000 Series Gigabit Ethernet Controlle
84 85:02.2 1077:8090:0200 FastLinQ QL41000 Series Gigabit Ethernet Controlle
85:02.3 1077:8090:0200 FastLinQ QL41000 Series Gigabit Ethernet Controlle
I see the passedthough nics in the VM as interface device and they’re working fine.
FWIW: I did not blacklist the corresponding modules and I did not explicitly bind the pci devices to vfio-pci because it’s not needed: