docs/doc/source/node_management/openstack/exposing-a-generic-pci-device-using-the-cli.rst
Rafael Jardim d6fb867888 Upstreaming WRO
Removed duplicate abbrev definitions

Signed-off-by: Rafael Jardim <rafaeljordao.jardim@windriver.com>
Change-Id: I7910d9f54e158250004abd7e17a4e119f8064252
Signed-off-by: Ron Stone <ronald.stone@windriver.com>
2021-03-31 08:57:23 -04:00

3.2 KiB

Expose a Generic PCI Device Using the CLI

For generic PCI-passthrough or devices (i.e not network interface devices or cards), you can configure access using the .

To expose a device for access, you must

  • enable the device on each host where it is installed
  • assign a system-wide alias to the device. For more information, see Configuring a PCI Alias in Nova <configuring-a-pci-alias-in-nova>.

To edit a device, you must first lock the host.

  1. List the non- devices on the host for which access is supported. Use -a to list disabled devices.

    ~(keystone_admin)$ system host-device-list compute-0 -a
    +------------+----------+------+-------+-------+------+--------+--------+-----------+---------+
    | name       | address  | class| vendor| device| class| vendor | device | numa_node | enabled |
    |            |          | id   | id    | id    |      |  name  | name   |           |         |
    +------------+----------+------+-------+-------+------+--------+--------+-----------+---------+
    |pci_0000_05.| 0000:05:.| 030. | 10de  | 13f2  | VGA. | NVIDIA.| GM204GL| 0         | True    |
    |pci_0000_06.| 0000:06:.| 030. | 10de  | 13f2  | VGA. | NVIDIA.| GM204GL| 0         | True    |
    |pci_0000_00.| 0000:00:.| 0c0. | 8086  | 8d2d  | USB  | Intel  | C610/x9| 0         | False   |
    +------------+----------+------+-------+-------+------+--------+--------+-----------+---------+

    This list shows the address needed to enable a device, and the device ID and vendor ID needed to add a Alias.

  2. On each host where the device is installed, enable the device.

    ~(keystone_admin)$system host-device-modify <hostname> <pci_address>
    --enable=True [--name="<devicename>"]

    where

    <hostname>

    is the name of the host where the device is installed

    <pci_address>

    is the address shown in the device list

    <devicename>

    is an optional descriptive name for display purposes

    For example:

    ~(keystone_admin)$ system host-device-modify --name="Encryption1" --enable=True compute-0 0000:09:00.0
  3. Assign a alias.

    The alias is a system-wide setting. It is used for all devices of the same type across multiple hosts. For more information, see Configuring a PCI Alias in Nova <configuring-a-pci-alias-in-nova>.

    As the change is applied, Config-out-of-date alarms are raised. The alarms are automatically cleared when the change is complete.

The device is added to the list of available devices.

To access a device from a , you must configure a flavor with a reference to the alias. For more information, see Configuring a Flavor to Use a Generic PCI Device <configuring-a-flavor-to-use-a-generic-pci-device>.