Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

Chapter 3. Configure SR-IOV Support for Virtual Networking

This chapter covers the configuration of Single Root Input/Output Virtualization (SR-IOV) within the Red Hat OpenStack Platform 10 environment using the director.

Note

This guide provides examples for CPU assignments, memory allocation, and NIC configurations that may vary from your topology and use case. See the Network Functions Virtualization Product Guide and the Network Functions Virtualization Planning Guide to understand the hardware and configuration options.

Note

Do not edit or change isolated_cores or other values in etc/tuned/cpu-partitioning-variables.conf that are modified by these director heat templates.

In the following procedure, you need to update the network-environment.yaml file to include parameters for kernel arguments, SR-IOV driver, PCI passthrough and so on. You must also update the compute.yaml file to include the SR-IOV interface parameters, and run the overcloud_deploy.sh script to deploy the overcloud with the SR-IOV parameters.

OpenStack NFV Config Guide Topology 450694 0617 ECE SR IOV

3.1. Configure Two-port SR-IOV with VLAN Tunnelling

This section describes the YAML files you need to modify to configure SR-IOV with two ports that use VLAN tunnelling for your OpenStack environment.

3.2. Create a Flavor and Deploy an Instance for SR-IOV

After you have completed configuring SR-IOV for your Red Hat OpenStack Platform deployment with NFV, you need to create a flavor and deploy an instance by performing the following steps.

  1. Create an aggregate group and add a host to it for SR-IOV. Define metadata, for example, "aggregate_instance_extra_specs:sriov"="true", that matches flavor metadata.

     # openstack aggregate create sriov_group
     # openstack aggregate set --property \
     "aggregate_instance_extra_specs:sriov"="true" sriov_group
     # openstack aggregate add host sriov compute-sriov-0.localdomain
  2. Create a flavor.

    # openstack flavor create <flavor> --ram <MB> --disk <GB> --vcpus <#>
  3. Set additional flavor properties. Note that the defined metadata, "aggregate_instance_extra_specs:sriov"="true", matches the defined metadata on the SR-IOV aggregate.

    # openstack flavor set --property "aggregate_instance_extra_specs:sriov"="true" \
    --property hw:cpu_policy=dedicated \
    --property hw:mem_page_size=large <flavor>
  4. Create the network.

    # openstack network create net1 --provider-physical-network tenant --provider-network-type vlan --provider-segment <VLAN-ID>
  5. Create the subnet.

    # openstack subnet create subnet1 --network net1 --subnet-range 192.0.2.0/24 --dhcp
  6. Create the port.

    1. Use vnic-type direct to create an SR-IOV VF port.

      # openstack port create --network net1 --vnic-type direct sriov_port
    2. Use vnic-type direct-physical to create an SR-IOV PF port.

      # openstack port create --network net1 --vnic-type direct-physical sriov_port
  7. Deploy an instance.

    # openstack server create --flavor <flavor>  --image <glance_image> --nic port-id=sriov_port <name>

You have now deployed an instance for the SR-IOV with NFV use case.