Undefine VMs upon destroy; Define VMs upon create
This commit is contained in:
2
command
2
command
@ -35,7 +35,7 @@ for VM in $VMS; do
|
||||
;;
|
||||
destroy)
|
||||
echo "[$VM] Destroying VM"
|
||||
ssh root@$HVN "/usr/bin/virsh list --all | grep $VM.*running >/dev/null && virsh destroy $VM"
|
||||
ssh root@$HVN "/usr/bin/virsh list --all | grep $VM.*running >/dev/null && virsh destroy $VM && virsh undefine $VM"
|
||||
echo "[$VM] Destroying ZFS image"
|
||||
ssh root@$HVN "zfs destroy -r vol0/$VM"
|
||||
;;
|
||||
|
2
create
2
create
@ -44,4 +44,6 @@ for VM in $VMS; do
|
||||
ssh root@$HVN "umount $STAGING/$VM; zfs snapshot vol0/${VM}@pristine"
|
||||
echo "[$VM] Copying libvirt config"
|
||||
scp -q build/${BUILD}/${HVN}/${VM}/root/libvirt.xml root@$HVN:${LABDIR}/${VM}.xml
|
||||
echo "[$VM] Defining libvirt config"
|
||||
ssh root@$HVN "virsh define ${LABDIR}/${VM}.xml"
|
||||
done
|
||||
|
8
generate-all
Executable file
8
generate-all
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
for o in frr bird; do
|
||||
for i in `seq 0 3`; do
|
||||
./generate --host hvn$i.lab.ipng.ch --overlay $o
|
||||
done
|
||||
done
|
||||
|
Reference in New Issue
Block a user