Add SR-IOV support

This change adds options needed for configuting SR-IOV on
the Nova side.

Change-Id: I022391828c3fe15d4ed9dc4dbdc28ce8e91ca71f
This commit is contained in:
Elena Ezhova 2017-03-01 20:39:25 +04:00
parent 0639b5e769
commit 8368c5da0a
3 changed files with 23 additions and 0 deletions

View File

@ -38,6 +38,9 @@ configs:
disk: 0.0
ram: 0.0
sriov:
enabled: false
ceph:
enable: false
pool_name: "vms"

View File

@ -51,6 +51,21 @@ my_ip = {{ network_topology["private"]["address"] }}
secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO
{% endif %}
{% if nova.sriov.enabled %}
{% if nova.sriov.pci_alias %}
pci_alias = [
{%- for alias in nova.sriov.pci_alias -%}
{%- if not loop.first %},{% endif -%}
{"name": "{{ alias.name }}", "product_id": "{{ alias.product_id }}", vendor_id": "{{ alias.vendor_id }}"}
{%- endfor %}]
{% endif %}
pci_passthrough_whitelist = [
{%- for pci_dev in nova.sriov.pci_passthrough_whitelist -%}
{%- if not loop.first %},{% endif -%}
{"devname": "{{ pci_dev.devname }}", "physical_network": "{{ pci_dev.physical_network }}"}
{%- endfor %}]
{% endif %}
{% if nova.console == 'novnc' %}
[vnc]
{% if nova.tls.enabled %}

View File

@ -27,6 +27,11 @@ service:
- name: cgroup
type: host
path: /sys/fs/cgroup
# {% if nova.sriov.enabled %}
- name: dev
type: host
path: /dev
# {% endif %}
pre:
- name: nova-libvirt-bootstrap
command: /tmp/nova-libvirt-bootstrap.sh