diff --git a/multi-node-aio/playbooks/deploy-vms.yml b/multi-node-aio/playbooks/deploy-vms.yml index e95fcfbe..291115ab 100644 --- a/multi-node-aio/playbooks/deploy-vms.yml +++ b/multi-node-aio/playbooks/deploy-vms.yml @@ -49,6 +49,16 @@ - hostvars[item]['server_vm'] | default(false) | bool with_items: "{{ groups['pxe_servers'] }}" + - name: Wait for guest capabilities to appear + command: "virsh capabilities" + register: virsh_caps + until: "'' in virsh_caps.stdout" + retries: 6 + delay: 10 + when: + - hostvars[item]['server_vm'] | default(false) | bool + with_items: "{{ groups['pxe_servers'] }}" + - name: Define the VM command: "virsh define /etc/libvirt/qemu/{{ hostvars[item]['server_hostname'] }}.xml" failed_when: false diff --git a/multi-node-aio/playbooks/setup-host.yml b/multi-node-aio/playbooks/setup-host.yml index a5e0abc3..45635ab4 100644 --- a/multi-node-aio/playbooks/setup-host.yml +++ b/multi-node-aio/playbooks/setup-host.yml @@ -198,6 +198,11 @@ failed_when: false register: virsh_data_volume + - name: Create /etc/libvirt/storage directory + file: + path: "/etc/libvirt/storage/" + state: "directory" + - name: Create virsh data volume shell: | virsh pool-create-as vg01 logical