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

This procedure does not apply to NVIDIA GRID vGPUs. To configure an NVIDIA GRID vGPU, see 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 Integrated OpenStack Manager as the root user.
    ssh root@mgmt-server-ip
  2. Edit the Nova configuration.
    viocli update nova
  3. In the nova section, create the pci section.
  4. In the pci section, create the alias section, add the type parameter and set its value to multistring.
  5. Add the values parameter and set its value to match your device.

    Use the following format:

    values:
    - '{"device_type": "type-PF", "vendor_id": "vendor-id", "name": "physical-name"}'
    - '{"device_type": "type-VF", "vendor_id": "vendor-id", "name": "virtual-name"}'
    Option Description

    vendor-id

    Enter the four-character vendor ID for your device. Enter all letters in lowercase.

    physical-name

    Enter an alias for the physical device.

    virtual-name

    Enter an alias for the virtual device.

  6. In the vmware section, add the generic_passthrough parameter and set its value to true.
    The configuration file now looks similar to the following.
    conf:
      nova:
        vmware:
          [...]
          generic_passthrough: true
        pci:
          alias:
            type: multistring
            values:
            - '{"device_type": "type-PF", "vendor_id": "vendor-id", "name": "physical-name"}'
            - '{"device_type": "type-VF", "vendor_id": "vendor-id", "name": "virtual-name"}'
  7. Edit the Nova compute configuration.
    viocli update nova-compute
  8. In the vmware section, add the generic_passthrough parameter and set its value to true.
    The configuration file now looks similar to the following.
    conf:
      nova_compute:
        DEFAULT:
          [...]
        vmware:
          [...]
          generic_passthrough: true
  9. Log in to the VMware Integrated OpenStack dashboard as a cloud administrator.
  10. Select the admin project from the drop-down menu in the title bar.
  11. Select Admin > Compute > Flavors.
  12. Create a new flavor or choose an existing flavor to use for passthrough.
  13. Select Update Metadata next to the flavor that you want to use.
  14. In the Custom field under Available Metadata, type vmware_extra_config and click the Add (plus sign) icon.
  15. Set the value of vmware:extra_config to {"pciPassthru.use64bitMMIO":"TRUE"}.
  16. In the Custom field under Available Metadata, type pci_passthrough:alias and click the Add (plus sign) icon.
  17. 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.

  18. Expand VMware Quota and click the Add (plus sign) icon next to Quota: Memory Reservation.
  19. 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 that you modified during this procedure.