@@ -188,6 +188,42 @@ Once this code has taken effect (after a reboot), the VFIO kernel drivers should
188
188
OpenStack Nova configuration
189
189
----------------------------
190
190
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
+
191
227
Testing GPU in a Guest VM
192
228
-------------------------
193
229
0 commit comments