You can configure a flavor to allow passthrough and then create OpenStack instances that use physical hardware interfaces.

Important: This procedure is supported only in VMware Integrated OpenStack 5.1.0.3 and later.

This procedure does not apply to NVIDIA GRID vGPUs. To configure an NVIDIA GRID vGPU, see Configure Passthrough for an NVIDIA GRID vGPU.

Prerequisites

  • Enable SR-IOV or DirectPath I/O in vSphere:
  • Create a dedicated compute cluster for SR-IOV devices. DRS rules do not apply to these devices.
  • Verify that the vmware_extra_config metadata is not configured on the image that you want to use for passthrough.
  • To persist the MAC address of a physical device, add its cluster as a compute node before enabling direct passthrough on the device. If direct passthrough has already been enabled, you can disable it, restart the cluster, and enable direct passthrough again.

Procedure

  1. Log in to the OpenStack Management Server as viouser.
  2. If your deployment is not using a custom.yml file, copy the template custom.yml file to the /opt/vmware/vio/custom directory.
    sudo mkdir -p /opt/vmware/vio/custom
    sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
  3. Open the /opt/vmware/vio/custom/custom.yml file in a text editor.
  4. Uncomment the nova_generic_passthrough parameter and set its value to true.
  5. Uncomment the nova_pci_alias parameter and modify its value to match your device.
    nova_pci_alias: [{"device_type": "type-VF", "name": "virtual-device-name"}, {"vendor_id":"vid", "product_id":"pid", "device_type": "type-PF", "name":"physical-device-name"}]

    where:

    • name (first occurrence) is the alias of the virtual device.
    • vendor_id is the four-character identifier of the physical device vendor. Enter all letters in lowercase.
    • device_id is the four-character identifier of the physical device. Enter all letters in lowercase.
    • name (second occurrence) is the alias of the physical device.
  6. Deploy the updated configuration.
    sudo viocli deployment configure

    Deploying the configuration briefly interrupts OpenStack services.

  7. Log in to the VMware Integrated OpenStack dashboard as a cloud administrator.
  8. Select the admin project from the drop-down menu in the title bar.
  9. Select Admin > Compute > Flavors.
  10. Create a new flavor or choose an existing flavor to use for passthrough.
  11. Select Update Metadata next to the flavor that you want to use.
  12. In the Custom field under Available Metadata, type vmware_extra_config and click the Add (plus sign) icon.
  13. Set the value of vmware:extra_config to {"pciPassthru.use64bitMMIO":"TRUE"}.
  14. In the Custom field under Available Metadata, type pci_passthrough:alias and click the Add (plus sign) icon.
  15. Set the value of pci_passthrough:alias to virtual-device-name:device-count.
    Option Description
    virtual-device-name

    Enter the virtual device name that you specified in this procedure.

    device-count

    Specify the number of virtual functions that can be called in one request.

    This value can range from 1 to 10.

  16. Expand VMware Quota and click the Add (plus sign) icon next to Quota: Memory Reservation.
  17. Set the value of quota:memory_reservation to 100 and click Save.

Results

You can now deploy passthrough-enabled virtual machines by configuring them with the flavor and image that you modified during this procedure.