I have created a vlan provider network and a port with vnic_type=direct under that network. I am trying to create instance with that port.
nova-compute.log
2025-04-04 17:37:28.014 7 ERROR nova.compute.manager [instance: bf8408e8-20a9-4963-9e50-033e54aba9fe] nova.exception.PortBindingFailed: Binding failed for port 6cbd8181-5707-4349-9fa0-c35e7370bfcd, please check neutron logs for more information.
neutron-server.log
025-04-04 17:37:27.000 25 DEBUG neutron.plugins.ml2.drivers.mech_sriov.mech_driver.mech_driver [req-ff074be0-e410-4df8-8938-7e2b59a84bfd req-d9bffb08-7e74-4976-b3ae-8cb544ec71f5 fbbdf9e30cad498180c3b637d1bba6d9 3e7a1867f1c24a158b4bb2d2f3f68b9c - - default default] Refusing to bind due to unsupported vnic_type: direct with switchdev capability bind_port /var/lib/kolla/venv/lib/python3.10/site-packages/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py:130
neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py
if (vnic_type == portbindings.VNIC_DIRECT and
'switchdev' in capabilities):
LOG.debug("Refusing to bind due to unsupported vnic_type: %s "
"with switchdev capability", portbindings.VNIC_DIRECT)
nova.conf
[pci]
passthrough_whitelist = [{"physical_network": "physnet5", "devname": "ens10f0"},{"physical_network": "physnet6", "devname": "ens10f1"}]
[sriov_nic]
physical_device_mappings = physnet5:ens10f0,physnet6:ens10f1
Is vnic_type=direct wrong if switchdev in capabilities or is this a configuration issue?
Environment:
Openstack version: Caracal
Operating System: Ubuntu 22.04
Thanks,
Serhat