Update the pci config for nova.

Add the possibility to set pci alias.

Change-Id: Id4872caed2cba6b2ef31e850cde63a2a88d55250
(cherry picked from commit 6bc12e3c86)
Signed-off-by: Matthew Thode <mthode@mthode.org>
This commit is contained in:
Marc Gariepy
2018-09-27 11:39:11 -04:00
committed by Matthew Thode
parent 97030ca777
commit 92ade9868a
2 changed files with 15 additions and 1 deletions

View File

@@ -637,3 +637,9 @@ lxd_storage_backend: dir
# Example:
# nova_pci_passthrough_whitelist: '{ "physical_network": "physnet1", "devname": "p1p1" }'
nova_pci_passthrough_whitelist: {}
# PCI alias,
# Example:
# nova_pci_alias:
# - '{ "name": "card-alias1", "product_id": "XXXX", "vendor_id": "XXXX" }'
# - '{ "name": "card-alias2", "product_id": "XXXY", "vendor_id": "XXXY" }'
nova_pci_alias: []

View File

@@ -352,8 +352,16 @@ compute=auto
enabled_vgpu_types = {{ enabled_vgpu_types | join(',') }}
{% endif %}
{% if nova_pci_passthrough_whitelist %}
{% if nova_pci_passthrough_whitelist or nova_pci_alias %}
[pci]
{% if nova_pci_passthrough_whitelist %}
# White list of PCI devices available to VMs.
passthrough_whitelist = "{{ nova_pci_passthrough_whitelist }}"
{% endif %}
{% if nova_pci_alias %}
# PCI Alias
{% for item in nova_pci_alias %}
alias = "{{item}}"
{% endfor %}
{% endif %}
{% endif %}