diff --git a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh index 5b4d890cf..6be9af1c8 100755 --- a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh +++ b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh @@ -197,7 +197,9 @@ function create_node { " echo ${vm_xml} > /tmp/vm.xml - virsh create /tmp/vm.xml 2>&1 >/dev/null + # NOTE(TheJulia): the create command powers on a VM that has been defined, + # where as define creates the VM, but does not change the power state. + virsh define /tmp/vm.xml 2>&1 >/dev/null if [ $? != 0 ] then echo "failed to create VM $NAME" >&2 diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index b6c3a228c..1228f792d 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -16,13 +16,6 @@ # in the interest of keeping the active memory footprint small, # should stop all of the VMs in advance, so we can proceed with # install and initial deploy. - - name: Attempt to stop all test VMs - virt: - name: "testvm{{ item }}" - command: "stop" - state: shutdown - with_sequence: start=1 end={{ test_vm_num_nodes | default('5') }} - ignore_errors: yes - name: Remove pre-existing leases file file: path=/var/lib/misc/dnsmasq.leases state=absent - hosts: localhost @@ -129,9 +122,7 @@ # validate that the dhcp config is working as expected and not # serving these requests. - name: Power on remaining test VMs - virt: - name: "testvm{{ item }}" - command: "start" + command: virsh start testvm{{item}} with_sequence: start=4 end={{ test_vm_num_nodes | default('5') }} ignore_errors: yes when: inventory_dhcp | bool == true