Skip to content

Commit e7890fc

Browse files
committed
Add example config for Nova compute service
1 parent 774979e commit e7890fc

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

source/gpus_in_openstack.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,42 @@ Once this code has taken effect (after a reboot), the VFIO kernel drivers should
188188
OpenStack Nova configuration
189189
----------------------------
190190

191+
Scheduler Filters
192+
~~~~~~~~~~~~~~~~~
193+
194+
Hypervisor Resource Tracking
195+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196+
197+
Configuration can be applied in flexible ways using Kolla-Ansible's
198+
methods for `inventory-driven customisation of configuration
199+
<https://docs.openstack.org/kayobe/latest/configuration/reference/kolla-ansible.html#service-configuration>`_.
200+
The following configuration could be added to
201+
``etc/kayobe/kolla/config/nova/nova-compute.conf`` to enable PCI
202+
passthrough of GPU devices for hosts in a group named ``compute_gpu``.
203+
Again, the 4-digit PCI Vendor ID and Device ID extracted from ``lspci
204+
-nn`` can be used here to specify the GPU device(s).
205+
206+
.. code-block:: yaml
207+
208+
[pci]
209+
{% raw %}
210+
{% if inventory_hostname in groups['compute_gpu'] %}
211+
# We could support multiple models of GPU.
212+
# This can be done more selectively using different inventory groups.
213+
# GPU models defined here:
214+
# NVidia Tesla V100 16GB
215+
# NVidia Tesla V100 32GB
216+
# NVidia Tesla P100 16GB
217+
passthrough_whitelist = [{ "vendor_id":"10de", "product_id":"1db4" },
218+
{ "vendor_id":"10de", "product_id":"1db5" },
219+
{ "vendor_id":"10de", "product_id":"15f8" }]
220+
alias = { "vendor_id":"10de", "product_id":"1db4", "device_type":"type-PCI", "name":"gpu-v100-16" }
221+
alias = { "vendor_id":"10de", "product_id":"1db5", "device_type":"type-PCI", "name":"gpu-v100-32" }
222+
alias = { "vendor_id":"10de", "product_id":"15f8", "device_type":"type-PCI", "name":"gpu-p100" }
223+
{% endif %}
224+
{% endraw %}
225+
226+
191227
Testing GPU in a Guest VM
192228
-------------------------
193229

0 commit comments

Comments
 (0)