@@ -21,7 +21,7 @@ Hypervisor Configuration Requirements
21
21
-------------------------------------
22
22
23
23
Find the GPU device IDs
24
- ~~~~~~~~~~~~~~~~~~~~~~~
24
+ ^^^^^^^^^^^^^^^^^^^^^^^
25
25
26
26
From the host OS, use ``lspci -nn `` to find the PCI vendor ID and
27
27
device ID for the GPU device and supporting components. These are
@@ -52,7 +52,7 @@ Alternatively, for an Nvidia Quadro RTX 6000:
52
52
These parameters will be used for device-specific configuration.
53
53
54
54
Kernel Ramdisk Reconfiguration
55
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
56
57
57
The ramdisk loaded during kernel boot can be extended to include the
58
58
vfio PCI drivers and ensure they are loaded early in system boot.
@@ -85,7 +85,7 @@ The handler for regenerating the Dracut initramfs is:
85
85
become : true
86
86
87
87
Kernel Boot Parameters
88
- ~~~~~~~~~~~~~~~~~~~~~~
88
+ ^^^^^^^^^^^^^^^^^^^^^^
89
89
90
90
Set the following kernel parameters by adding to
91
91
``GRUB_CMDLINE_LINUX_DEFAULT `` or ``GRUB_CMDLINE_LINUX `` in
@@ -109,7 +109,7 @@ role from Ansible Galaxy:
109
109
- vfio-pci.ids
110
110
111
111
Kernel Device Management
112
- ~~~~~~~~~~~~~~~~~~~~~~~~
112
+ ^^^^^^^^^^^^^^^^^^^^^^^^
113
113
114
114
In the hypervisor, we must prevent kernel device initialisation of
115
115
the GPU and prevent drivers from loading for binding the GPU in the
@@ -133,7 +133,7 @@ host OS. We do this using ``udev`` rules:
133
133
become : true
134
134
135
135
Kernel Drivers
136
- ~~~~~~~~~~~~~~
136
+ ^^^^^^^^^^^^^^
137
137
138
138
Prevent the ``nouveau `` kernel driver from loading by
139
139
blacklisting the module:
@@ -203,7 +203,7 @@ OpenStack Nova configuration
203
203
----------------------------
204
204
205
205
Configure nova-scheduler
206
- ~~~~~~~~~~~~~~~~~~~~~~~~
206
+ ^^^^^^^^^^^^^^^^^^^^^^^^
207
207
208
208
The nova-scheduler service must be configured to enable the ``PciPassthroughFilter ``
209
209
To enable it add it to the list of filters to Kolla-Ansible configuration file:
@@ -216,7 +216,7 @@ To enable it add it to the list of filters to Kolla-Ansible configuration file:
216
216
enabled_filters = AvailabilityZoneFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter, PciPassthroughFilter
217
217
218
218
Configure nova-compute
219
- ~~~~~~~~~~~~~~~~~~~~~~
219
+ ^^^^^^^^^^^^^^^^^^^^^^
220
220
221
221
Configuration can be applied in flexible ways using Kolla-Ansible's
222
222
methods for `inventory-driven customisation of configuration
@@ -248,7 +248,7 @@ Again, the 4-digit PCI Vendor ID and Device ID extracted from ``lspci
248
248
{% endraw %}
249
249
250
250
Configure nova-api
251
- ~~~~~~~~~~~~~~~~~~
251
+ ^^^^^^^^^^^^^^^^^^
252
252
253
253
pci.alias also needs to be configured on the controller.
254
254
This configuration should match the configuration found on the compute nodes.
@@ -263,23 +263,51 @@ Add it to Kolla-Ansible configuration file:
263
263
alias = { "vendor_id":"10de", "product_id":"15f8", "device_type":"type-PCI", "name":"gpu-p100" }
264
264
265
265
Reconfigure nova service
266
- ~~~~~~~~~~~~~~~~~~~~~~~~
266
+ ^^^^^^^^^^^^^^^^^^^^^^^^
267
267
268
268
.. code-block :: text
269
269
270
270
kayobe overcloud service reconfigure -kt nova --kolla-skip-tags common --skip-precheck
271
271
272
272
Configure a flavor
273
- ~~~~~~~~~~~~~~~~~~
273
+ ^^^^^^^^^^^^^^^^^^
274
+
274
275
For example, to request two of the GPUs with alias gpu-p100
275
276
276
277
.. code-block :: text
277
278
278
279
openstack flavor set m1.medium --property "pci_passthrough:alias"="gpu-p100:2"
279
280
280
281
282
+ This can be also defined in the |project_config | repository:
283
+ |project_config_source_url |
284
+
285
+ add extra_specs to flavor in etc/|project_config |/|project_config |.yml:
286
+
287
+ .. code-block :: console
288
+ :substitutions:
289
+
290
+ admin# cd |base_path|/src/|project_config|
291
+ admin# vim etc/|project_config|/|project_config|.yml
292
+
293
+ name: "m1.medium"
294
+ ram: 4096
295
+ disk: 40
296
+ vcpus: 2
297
+ extra_specs:
298
+ "pci_passthrough:alias": "gpu-p100:2"
299
+
300
+ Invoke configuration playbooks afterwards:
301
+
302
+ .. code-block :: console
303
+ :substitutions:
304
+
305
+ admin# source |base_path|/src/|kayobe_config|/etc/kolla/public-openrc.sh
306
+ admin# source |base_path|/venvs/|project_config|/bin/activate
307
+ admin# tools/|project_config| --vault-password-file |vault_password_file_path|
308
+
281
309
Create instance with GPU passthrough
282
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
283
311
284
312
.. code-block :: text
285
313
0 commit comments