Add lab-build snippets and executing them in 'create'. Refactor create/destroy/pristine; also, only virsh destroy VMs if they are 'running'

This commit is contained in:
Pim van Pelt
2023-05-06 12:41:01 +00:00
parent bd4c76689d
commit 72245529a2
17 changed files with 102 additions and 24 deletions

View File

@ -13,8 +13,12 @@ CMD=$1
exit
}
echo "* Executing $CMD against all VMs on lab $LAB"
ssh root@$HVN "set -x; for node in 0 1 2 3; do VM=vpp${LAB}-\${node}; virsh $CMD \$VM; done"
VMS=$(ls -1 build/${BUILD}/${HVN}/)
for VM in $VMS; do
echo "[$VM] Executing $CMD against VMs on lab $LAB"
ssh root@$HVN "virsh $CMD $VM"
done
[ "$CMD" = "start" ] && {
echo "* Committing OVS config"