Merge "[admin-guide] Minor refactoring of the PCI guide"
This commit is contained in:
commit
7cd6679218
@ -4,23 +4,22 @@
|
|||||||
Attaching physical PCI devices to guests
|
Attaching physical PCI devices to guests
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
The PCI passthrough feature in OpenStack allows full access and direct
|
The PCI passthrough feature in OpenStack allows full access and direct control
|
||||||
control of a physical PCI device in guests. This mechanism is generic for any
|
of a physical PCI device in guests. This mechanism is generic for any kind of
|
||||||
kind of PCI devices (for example: Network Interface Card (NIC), Graphics
|
PCI device, and runs with a Network Interface Card (NIC), Graphics Processing
|
||||||
Processing Unit (GPU) or any other devices that can be attached to a PCI bus).
|
Unit (GPU), or any other devices that can be attached to a PCI bus. Correct
|
||||||
Correct driver installation is the only requirement for the guest to properly
|
driver installation is the only requirement for the guest to properly
|
||||||
use the devices.
|
use the devices.
|
||||||
|
|
||||||
PCI devices, if supported by the hardware, can provide Single Root I/O
|
Some PCI devices provide Single Root I/O Virtualization and Sharing (SR-IOV)
|
||||||
Virtualization and Sharing (SR-IOV) functionality. In this case, a physical
|
capabilities. When SR-IOV is used, a physical device is virtualized and appears
|
||||||
device is virtualized and appears as multiple PCI devices. Virtual PCI
|
as multiple PCI devices. Virtual PCI devices are assigned to the same or
|
||||||
devices are assigned to the same or different guests. In the case of PCI
|
different guests. In the case of PCI passthrough, the full physical device is
|
||||||
passthrough, the full physical device is assigned to only one guest and cannot
|
assigned to only one guest and cannot be shared.
|
||||||
be shared.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
For Attaching virtual SR-IOV devices to guests, refer to the
|
For information on attaching virtual SR-IOV devices to guests, refer to the
|
||||||
`Networking Guide`_.
|
`Networking Guide`_.
|
||||||
|
|
||||||
To enable PCI passthrough, follow the steps below:
|
To enable PCI passthrough, follow the steps below:
|
||||||
@ -33,8 +32,8 @@ To enable PCI passthrough, follow the steps below:
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The PCI device with address ``0000:41:00.0`` is as an example. Expect
|
The PCI device with address ``0000:41:00.0`` is used as an example. This
|
||||||
to change this according to your actual environment.
|
will differ between environments.
|
||||||
|
|
||||||
Configure nova-scheduler (Controller)
|
Configure nova-scheduler (Controller)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -59,16 +58,16 @@ Configure nova-api (Controller)
|
|||||||
[default]
|
[default]
|
||||||
pci_alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }
|
pci_alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }
|
||||||
|
|
||||||
For more information about the syntax of ``pci_alias``, refer to
|
For more information about the syntax of ``pci_alias``, refer to `nova.conf
|
||||||
`nova.conf configuration options`_.
|
configuration options`_.
|
||||||
|
|
||||||
#. Restart the ``nova-api`` service.
|
#. Restart the ``nova-api`` service.
|
||||||
|
|
||||||
Configure a flavor (Controller)
|
Configure a flavor (Controller)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Configure a flavor to request two PCI devices, each with ``vendor_id`` as
|
Configure a flavor to request two PCI devices, each with ``vendor_id`` of
|
||||||
``0x8086`` and ``product_id`` as ``0x154d``.
|
``0x8086`` and ``product_id`` of ``0x154d``:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@ -80,13 +79,13 @@ For more information about the syntax for ``pci_passthrough:alias``, refer to
|
|||||||
Enable PCI passthrough (Compute)
|
Enable PCI passthrough (Compute)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Enable VT-d and IOMMU. For more information, refer to steps one and two
|
Enable VT-d and IOMMU. For more information, refer to steps one and two in
|
||||||
in `Create Virtual Functions`_.
|
`Create Virtual Functions`_.
|
||||||
|
|
||||||
Configure PCI devices ``nova-compute`` (Compute)
|
Configure PCI devices (Compute)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
#. Configure ``nova-compute`` to allow the PCI device to be passed through to
|
#. Configure ``nova-compute`` to allow the PCI device to pass through to
|
||||||
VMs. Edit ``/etc/nova/nova.conf``:
|
VMs. Edit ``/etc/nova/nova.conf``:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
@ -109,8 +108,8 @@ Configure PCI devices ``nova-compute`` (Compute)
|
|||||||
|
|
||||||
#. Specify the PCI alias for the device.
|
#. Specify the PCI alias for the device.
|
||||||
|
|
||||||
From the Newton release, to resize guest with PCI device, configure
|
From the Newton release, to resize guest with PCI device, configure the PCI
|
||||||
the PCI alias on the compute node as well.
|
alias on the compute node as well.
|
||||||
|
|
||||||
Configure a PCI alias ``a1`` to request a PCI device with a ``vendor_id`` of
|
Configure a PCI alias ``a1`` to request a PCI device with a ``vendor_id`` of
|
||||||
``0x8086`` and a ``product_id`` of ``0x154d``. The ``vendor_id`` and
|
``0x8086`` and a ``product_id`` of ``0x154d``. The ``vendor_id`` and
|
||||||
@ -123,8 +122,8 @@ Configure PCI devices ``nova-compute`` (Compute)
|
|||||||
[default]
|
[default]
|
||||||
pci_alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }
|
pci_alias = { "vendor_id":"8086", "product_id":"154d", "device_type":"type-PF", "name":"a1" }
|
||||||
|
|
||||||
For more information about the syntax of ``pci_alias``, refer to
|
For more information about the syntax of ``pci_alias``, refer to `nova.conf
|
||||||
`nova.conf configuration options`_.
|
configuration options`_.
|
||||||
|
|
||||||
#. Restart the ``nova-compute`` service.
|
#. Restart the ``nova-compute`` service.
|
||||||
|
|
||||||
@ -132,8 +131,8 @@ Create instances with PCI passthrough devices
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The ``nova-scheduler`` selects a destination host that has PCI devices
|
The ``nova-scheduler`` selects a destination host that has PCI devices
|
||||||
available with the specified ``vendor_id`` and ``product_id`` that matches
|
available with the specified ``vendor_id`` and ``product_id`` that matches the
|
||||||
the ``pci_alias`` from the flavor.
|
``pci_alias`` from the flavor.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user