echo "[ICN] Bringing up test cluster"
function clean_vm {
pushd ${WORKSPACE}/icn
- vagrant destroy -f
+ # TODO Vagrant has a known issue
+ # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371)
+ # destroying the VMs, so destroy them manually here
+ vagrant destroy -f jump
+ virsh -c qemu:///system destroy vm-machine-1
+ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
+ virsh -c qemu:///system destroy vm-machine-2
+ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
popd
}
trap clean_vm EXIT
set -exuf -o pipefail
function clean_vm {{
- vagrant destroy -f
+ # TODO Vagrant has a known issue
+ # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371)
+ # destroying the VMs, so destroy them manually here
+ vagrant destroy -f jump
+ virsh -c qemu:///system destroy vm-machine-1
+ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
+ virsh -c qemu:///system destroy vm-machine-2
+ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
}}
trap clean_vm EXIT
### Configuration
-> NOTE:/ To assist in the migration of R5 and earlier release's use from
+> NOTE: To assist in the migration of R5 and earlier release's use from
> nodes.json and the Provisioning resource to the site YAML described
> below, a helper script is provided at tools/migration/to<sub>r6.sh</sub>.
root@jump:/icn# make jump_server
root@jump:/icn# make vm_cluster
+> NOTE: vagrant destroy may fail due to
+> https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371. The
+> workaround is to destroy the machines manually
+>
+> $ virsh -c qemu:///system destroy vm-machine-1
+> $ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
+> $ virsh -c qemu:///system destroy vm-machine-2
+> $ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
## Create the virtual environment