summaryrefslogtreecommitdiffstats
path: root/xci/playbooks
diff options
context:
space:
mode:
authorFatih Degirmenci <fdegir@gmail.com>2018-08-08 11:23:10 +0200
committerFatih Degirmenci <fdegir@gmail.com>2018-08-08 11:23:10 +0200
commitd8035cd012c941c615862e75ed54ad5fc3620846 (patch)
treefeabba3eed937001ca9e601b03aca41e4923add0 /xci/playbooks
parent633523bdadee2617573cdbafa7d24269da738db8 (diff)
Resize OPNFV VM Disk
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>
Diffstat (limited to 'xci/playbooks')
-rw-r--r--xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
index d8169c2f..ab427c69 100644
--- a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
+++ b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
@@ -40,6 +40,12 @@
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