Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ interfaces:
auto-dns: false
enabled: true
link-aggregation:
{% if hostvars[item]['vendor'] == 'Libvirt' %}
mode: active-backup
{% else %}
mode: 802.3ad
{% endif %}
options:
miimon: '100'
port:
Expand Down
16 changes: 16 additions & 0 deletions ansible/roles/create-inventory/templates/inventory-mno.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,22 @@ dns2={{ labs[lab]['dns'][1] | default('') }}
{% set hv_loop = loop %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default']) %}
{% if ctr.vm <= hybrid_worker_count %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% if hv.disk2_enable %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]][hv.disk2_device]) %}
{% if ctr.vm <= hybrid_worker_count %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
Expand Down Expand Up @@ -139,12 +147,20 @@ network_prefix={{ controlplane_network_prefix }}
{% for hv in ocpinventory_hv_nodes %}
{% set hv_loop = loop %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default']) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location=/var/lib/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location=/var/lib/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% if hv.disk2_enable %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]][hv.disk2_device]) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index + hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default'] }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location={{ disk2_mount_path }}/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index + hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default'] }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location={{ disk2_mount_path }}/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% endif %}
Expand Down
36 changes: 36 additions & 0 deletions ansible/roles/create-inventory/templates/inventory-vmno.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ base_dns_name={{ base_dns_name }}
bastion_lab_interface={{ bastion_lab_interface }}
bastion_controlplane_interface={{ bastion_controlplane_interface }}
controlplane_lab_interface={{ controlplane_lab_interface }}
{% if enable_bond | default(false) %}
bastion_bond0_interface1={{ bastion_bond0_interface1 }}
bastion_bond0_interface2={{ bastion_bond0_interface2 }}
{% endif %}

[bastion]
{{ bastion_machine }} ansible_ssh_user=root bmc_address=mgmt-{{ bastion_machine }} lab_ip={{ bastion_foreman_data.json.ip }}
Expand All @@ -27,14 +31,22 @@ bmc_password={{ bmc_password }}
{% set hv_loop = loop %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default']) %}
{% if ctr.vm <= 3 %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% if hv.disk2_enable %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]][hv.disk2_device]) %}
{% if ctr.vm <= 3 %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
Expand All @@ -47,7 +59,11 @@ role=master
boot_iso=discovery.iso
bmc_user={{ bmc_user }}
bmc_password={{ bmc_password }}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
bond0_interfaces={{ private_bond_interfaces }}
{% else %}
network_interface={{ controlplane_network_interface }}
{% endif %}
network_prefix={{ controlplane_network_prefix }}
gateway={{ controlplane_network_gateway }}
{% if controlplane_bastion_as_dns %}
Expand All @@ -63,15 +79,23 @@ dns2={{ labs[lab]['dns'][1] | default('') }}
{% set hv_loop = loop %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default']) %}
{% if ctr.vm > 3 and ctr.vm <= (worker_node_count + 3) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% if hv.disk2_enable %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]][hv.disk2_device]) %}
{% if ctr.vm > 3 and ctr.vm <= (worker_node_count + 3) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} bmc_address={{ hv.pm_addr | replace('mgmt-','') }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} vendor=Libvirt install_disk=/dev/sda
{% endif %}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% endif %}
Expand All @@ -83,7 +107,11 @@ role=worker
boot_iso=discovery.iso
bmc_user={{ bmc_user }}
bmc_password={{ bmc_password }}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
bond0_interfaces={{ private_bond_interfaces }}
{% else %}
network_interface={{ controlplane_network_interface }}
{% endif %}
network_prefix={{ controlplane_network_prefix }}
gateway={{ controlplane_network_gateway }}
{% if controlplane_bastion_as_dns %}
Expand Down Expand Up @@ -116,12 +144,20 @@ network_prefix={{ controlplane_network_prefix }}
{% for hv in ocpinventory_hv_nodes %}
{% set hv_loop = loop %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default']) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location=/var/lib/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location=/var/lib/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% if hv.disk2_enable %}
{% for vm in range(hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]][hv.disk2_device]) %}
{% if enable_bond | default(false) and not (public_vlan | default(false)) %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index + hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default'] }} bond0_macs={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') ~ ',' ~ (90520730740496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location={{ disk2_mount_path }}/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% else %}
{{ hv_vm_prefix }}{{ '%05d' % ctr.vm }} ansible_host={{ hv.pm_addr | replace('mgmt-','') }} hv_ip={{ controlplane_network | ansible.utils.nthhost(hv_loop.index + ocpinventory_worker_nodes|length + mno_worker_node_offset + hv_ip_offset) }} ip={{ controlplane_network | ansible.utils.nthhost(hv_vm_ip_offset + ctr.vm - 1) }} cpus={{ hv_vm_cpu_count }} memory={{ hv_vm_memory_size }} disk_size={{ hv_vm_disk_size }} vnc_port={{ 5900 + loop.index + hw_vm_counts[lab][(hv.pm_addr.split('.')[0]).split('-')[-1]]['default'] }} mac_address={{ (90520730730496 + ctr.vm) | ansible.utils.hwaddr('linux') }} domain_uuid={{ ctr.vm | to_uuid }} disk_location={{ disk2_mount_path }}/libvirt/images bw_avg={{ hv_vm_bandwidth_average }} bw_peak={{ hv_vm_bandwidth_peak }} bw_burst={{ hv_vm_bandwidth_burst }}
{% endif %}
{% set ctr.vm = ctr.vm + 1 %}
{% endfor %}
{% endif %}
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/hv-vm-create/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ hv_kvm_def_path: /opt/hv

hv_bmc_port: 9000

# Bonding Configuration
# When enable_bond is true, VMs in the [hv_vm] inventory section will have
# bond0_macs defined (comma-separated MAC addresses) instead of mac_address.
# The kvm-def.xml.j2 template will parse bond0_macs and create two network
# interfaces for bonding.

# vNUMA Configuration
vnuma_enabled: false
vnuma_memory_placement: "static"
Expand Down
28 changes: 28 additions & 0 deletions ansible/roles/hv-vm-create/templates/kvm-def.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@
<target chassis='4' port='0x13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
{% if 'bond0_macs' in hostvars[inventory_hostname] %}
{% set bond_macs = hostvars[inventory_hostname]['bond0_macs'].split(',') %}
<interface type='bridge'>
<mac address='{{ bond_macs[0] }}'/>
<source bridge='br0'/>
<model type='virtio'/>
{% if bw_limit | default(false) %}
<bandwidth>
<inbound average='{{ hostvars[inventory_hostname]['bw_avg'] }}' peak='{{ hostvars[inventory_hostname]['bw_peak'] }}' burst='{{ hostvars[inventory_hostname]['bw_burst'] }}'/>
<outbound average='{{ hostvars[inventory_hostname]['bw_avg'] }}' peak='{{ hostvars[inventory_hostname]['bw_peak'] }}' burst='{{ hostvars[inventory_hostname]['bw_burst'] }}'/>
</bandwidth>
{% endif %}
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<interface type='bridge'>
<mac address='{{ bond_macs[1] }}'/>
<source bridge='br0'/>
<model type='virtio'/>
{% if bw_limit | default(false) %}
<bandwidth>
<inbound average='{{ hostvars[inventory_hostname]['bw_avg'] }}' peak='{{ hostvars[inventory_hostname]['bw_peak'] }}' burst='{{ hostvars[inventory_hostname]['bw_burst'] }}'/>
<outbound average='{{ hostvars[inventory_hostname]['bw_avg'] }}' peak='{{ hostvars[inventory_hostname]['bw_peak'] }}' burst='{{ hostvars[inventory_hostname]['bw_burst'] }}'/>
</bandwidth>
{% endif %}
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</interface>
{% else %}
<interface type='bridge'>
<mac address='{{ hostvars[inventory_hostname]['mac_address'] }}'/>
<source bridge='br0'/>
Expand All @@ -125,6 +152,7 @@
{% endif %}
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
{% endif %}
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
Expand Down