The following procedure is common for both OpenVSwitch and OpenContrail. SR-IOV can be enabled before or after installation on the MCP cluster model level.
To enable SR-IOV:
Include the class to cluster.<NAME>.openstack.compute
:
- system.neutron.compute.nfv.sriov
Note
By default, the metadata model contains configuration for 1 NIC dedicated for SR-IOV.
Set the following parameters:
sriov_nic01_device_name
Name of the interface, where the Virtual Functions are enabled
sriov_nic01_numvfs
Number of Virtual Functions
sriov_nic01_physical_network
Default is physnet1
, label for the physical network the interface
belongs to
sriov_unsafe_interrupts
Default is False
, needs to be set to True
if your hardware
platform does not support interrupt remapping
For most deployments with 1 NIC for SR-IOV, we recommend the following
configuration in cluster.<name>.openstack.init
on all compute nodes:
sriov_nic01_device_name: eth1
sriov_nic01_numvfs: 7
sriov_nic01_physical_network: physnet3
If you need to set different values for each compute node,
specify them in cluster.<name>.infra.config
.
Example
openstack_compute_node02:
name: ${_param:openstack_compute_node02_hostname}
domain: ${_param:cluster_domain}
classes:
- cluster.${_param:cluster_name}.openstack.compute
params:
salt_master_host: ${_param:reclass_config_master}
linux_system_codename: xenial
sriov_nic01_device_name: eth1
sriov_nic01_numvfs: 7
sriov_nic01_physical_network: physnet3
If your hardware does not support interrupt remapping, set the following parameter:
sriov_unsafe_interrupts: True
If you need more than one NIC on a compute node, set the following
parameters in cluster.<NAME>.openstack.compute
.
Example
...
nova:
compute:
sriov:
sriov_nic01:
devname: eth1
physical_network: physnet3
sriov_nic02:
devname: eth2
physical_network: physnet4
sriov_nic03:
devname: eth3
physical_network: physnet5
sriov_nic04:
devname: eth4
physical_network: physnet6
linux:
system:
kernel:
sriov: True
unsafe_interrupts: False
sysfs:
sriov_numvfs:
class/net/eth1/device/sriov_numvfs: 7
class/net/eth2/device/sriov_numvfs: 15
class/net/eth3/device/sriov_numvfs: 15
class/net/eth4/device/sriov_numvfs: 7
Enable the kernel boot parameter for the OpenStack compute node:
linux:
system:
kernel:
boot_options:
- intel_iommu=on
Select from the following options:
If you are performing the initial deployment of your environment, proceed with the further environment configurations.
If you are making changes to an existing environment:
Run the virt-host-validate command from an OpenStack compute node to ensure that it is ready for SR-IOV.
Re-run the salt configuration on the Salt Master node:
salt "cmp*" state.sls linux,nova
Reboot the OpenStack compute nodes one by one as described in MCP Operations Guide: Reboot a compute node.