Configure PCI passthrough for guests¶
Note
Consider this section as part of Deploy an OpenStack cluster.
The Peripheral Component Interconnect (PCI) passthrough feature in OpenStack allows full access and direct control over physical PCI devices in guests. The mechanism applies to any kind of PCI devices including a Network Interface Card (NIC), Graphics Processing Unit (GPU), and any other device that can be attached to a PCI bus. The only requirement for the guest to properly use the device is to correctly install the driver.
To enable PCI passthrough in a MOSK deployment:
For Linux X86 compute nodes, verify that the following features are enabled on the host:
VT-d in BIOS
IOMMU on the host operating system as described in Enable SR-IOV with OVS.
Configure the
nova-api
service that is scheduled on OpenStack controllers nodes. To generate the alias for PCI innova.conf
, add the alias configuration through theOpenStackDeployment
CR.Note
When configuring PCI with SR-IOV on the same host, the values specified in
alias
take precedence. Therefore, add the SR-IOV devices topassthrough_whitelist
explicitly.For example:
spec: services: compute: nova: values: conf: nova: pci: alias: '{ "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }'
Configure the
nova-compute
service that is scheduled on OpenStack compute nodes. To enable Nova to pass PCI devices to virtual machines, configure thepassthrough_whitelist
section innova.conf
through the node-specific overrides in theOpenStackDeployment
CR. For example:spec: nodes: <NODE-LABEL>::<NODE-LABEL-VALUE>: services: compute: nova: nova_compute: values: conf: nova: pci: alias: '{ "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }' passthrough_whitelist: | [{"devname":"enp216s0f0","physical_network":"sriovnet0"}, { "vendor_id": "8086", "product_id": "154d" }]