From d52d5b21a8309537fc30767f4a209f067fc509bb Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 29 Aug 2018 10:43:50 +0100 Subject: xci: roles: create-vm-nodes: Always provision VM nodes The role used to get the output of 'virsh list --all' to determine how many VMs are present and shut off in the system. This takes *all* VMs on the system into consideration so it may skip creation of some or all of the XCI VMs if we happen to have other VMs present. We can improve the situation by simply dropping this check and always provision the VMs we want. If the VM is already present, then the module will simply do a sanity check of its configuration. This allows XCI to run alongside other VMs. Change-Id: I54255a1959509671c0305f48f23a55b6e900684f Signed-off-by: Markos Chandras --- xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (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 index c44fa6aa..5c235f55 100644 --- a/xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 +++ b/xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 @@ -1,9 +1,9 @@ {{ vm_name }} - {{ item.node.memory.rstrip('G') }} - {{ item.node.cpus }} + {{ item.1.node.memory.rstrip('G') }} + {{ item.1.node.cpus }} - hvm + hvm {%- if 'opnfv' in vm_name -%} {%- else -%} @@ -17,7 +17,7 @@ - + @@ -36,7 +36,7 @@
{% set native_interfaces = [] %} - {%- for interface in item.interfaces %} + {%- for interface in item.1.interfaces %} {%- if 'native' in (interface.vlan | string) %} {%- set _ = native_interfaces.append(interface) %} {%- endif %} -- cgit 1.2.3-korg