OPNFV VM creation is separated from the rest of the nodes, resulting
in its disk being left without resizing. It is important to resize
its disk to the value defined in its PDF opnfv_vm.yml so the installation
of the other tools does not fail due to lack of space.
Change-Id: I8300e6e355d11788cc983fcebca56076e89918e1
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
path: "{{ opnfv_image_path }}/{{ vm_name }}.qcow2"
register: _vm_volume_prepared
+ - name: Resize opnfv VM image to {{ item.disks[0].disk_capacity }}
+ command: "qemu-img resize {{ opnfv_image_path }}/opnfv.qcow2 {{ item.disks[0].disk_capacity }}"
+ when:
+ - vm_name == 'opnfv'
+ - _vm_volume_prepared.stat.exists
+
# NOTE(pas-ha) Ansible still lacks modules to operate on libvirt volumes
# mbuil: Assuming there is only one disk [0]
- name: create volume for vm