From 92fc2a3c43305532b885ef70201f363204b69a3b Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Mon, 25 Jun 2018 10:57:02 +0100 Subject: xci: roles: create-vm-nodes: Add role for creating XCI VM nodes Add a new role based on the bifrost one to create nodes for the bifrost virtual deployments. This role will install and configure libvirt on the host, download a prebuilt OPNFV VM image and deploy the OPNFV VM using that image. Moreover, it will create the rest of the nodes for the virtual deployment which will be configured by bifrost later on. Change-Id: I9fbd084261351d3b53ae373060f43df046191c5e Co-Authored-by: Markos Chandras Signed-off-by: Manuel Buil --- .../roles/create-vm-nodes/templates/vm.xml.j2 | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 (limited to 'xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2') diff --git a/xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 b/xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 new file mode 100644 index 00000000..c44fa6aa --- /dev/null +++ b/xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 @@ -0,0 +1,76 @@ + + {{ vm_name }} + {{ item.node.memory.rstrip('G') }} + {{ item.node.cpus }} + + hvm + {%- if 'opnfv' in vm_name -%} + + {%- else -%} + + {% endif -%} + + + + + + + + + + + + + destroy + restart + restart + + {{ vm_emulator }} + + + + +
+ + +
+ + {% set native_interfaces = [] %} + {%- for interface in item.interfaces %} + {%- if 'native' in (interface.vlan | string) %} + {%- set _ = native_interfaces.append(interface) %} + {%- endif %} + {%- endfor %} + {%- for interface in native_interfaces -%} + + + + + + {% endfor -%} + + +