summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/create-nodes/templates/vm.xml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks/roles/create-nodes/templates/vm.xml.j2')
-rw-r--r--xci/playbooks/roles/create-nodes/templates/vm.xml.j213
1 files changed, 12 insertions, 1 deletions
diff --git a/xci/playbooks/roles/create-nodes/templates/vm.xml.j2 b/xci/playbooks/roles/create-nodes/templates/vm.xml.j2
index e4e41eda..6061fc52 100644
--- a/xci/playbooks/roles/create-nodes/templates/vm.xml.j2
+++ b/xci/playbooks/roles/create-nodes/templates/vm.xml.j2
@@ -36,10 +36,21 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
- <source network='{{ vm_network }}'/>
+ <source network='{{ vm_network_admin }}'/>
<model type='{{ vm_nic }}'/>
+ {%- if vm_name == 'opnfv' -%}
<mac address='{{ item.1.interfaces[opnfv_vm_idf.net_config.admin.interface].mac_address }}'/>
+ {%- else -%}
+ <mac address='{{ item.1.interfaces[idf.net_config.admin.interface].mac_address }}'/>
+ {%- endif -%}
</interface>
+ {%- if baremetal | bool -%}
+ <interface type='network'>
+ <source network='{{ vm_network_mgmt }}'/>
+ <model type='{{ vm_nic }}'/>
+ <mac address='{{ item.1.interfaces[opnfv_vm_idf.net_config.mgmt.interface].mac_address }}'/>
+ </interface>
+ {%- endif -%}
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<video>