-
Notifications
You must be signed in to change notification settings - Fork 9
/
delete-lab.sh
executable file
·63 lines (62 loc) · 2.17 KB
/
delete-lab.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
# The script will DELETE lab VMs, networks and bridges
echo "connecting to 192.168.178.178 via SSH"
ssh [email protected] << EOF
cd ~
sudo rm -rf ./net_definitions
sudo virsh destroy SPINE1
sudo virsh undefine SPINE1
sudo rm /var/lib/libvirt/images/SPINE1-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy SPINE2
sudo virsh undefine SPINE2
sudo rm /var/lib/libvirt/images/SPINE2-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy LEAF1
sudo virsh undefine LEAF1
sudo rm /var/lib/libvirt/images/LEAF1-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy LEAF2
sudo virsh undefine LEAF2
sudo rm /var/lib/libvirt/images/LEAF2-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy LEAF3
sudo virsh undefine LEAF3
sudo rm /var/lib/libvirt/images/LEAF3-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy LEAF4
sudo virsh undefine LEAF4
sudo rm /var/lib/libvirt/images/LEAF4-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy HOST1
sudo virsh undefine HOST1
sudo rm /var/lib/libvirt/images/HOST1-vEOS-lab-4.22.4M.qcow2
sudo virsh destroy HOST2
sudo virsh undefine HOST2
sudo rm /var/lib/libvirt/images/HOST2-vEOS-lab-4.22.4M.qcow2
sudo virsh net-destroy net00000200
sudo virsh net-undefine net00000200
sudo virsh net-destroy net00000300
sudo virsh net-undefine net00000300
sudo virsh net-destroy net00000400
sudo virsh net-undefine net00000400
sudo virsh net-destroy net00000500
sudo virsh net-undefine net00000500
sudo virsh net-destroy net00100200
sudo virsh net-undefine net00100200
sudo virsh net-destroy net00100300
sudo virsh net-undefine net00100300
sudo virsh net-destroy net00100400
sudo virsh net-undefine net00100400
sudo virsh net-destroy net00100500
sudo virsh net-undefine net00100500
sudo virsh net-destroy net00200300
sudo virsh net-undefine net00200300
sudo virsh net-destroy net00200301
sudo virsh net-undefine net00200301
sudo virsh net-destroy net00200600
sudo virsh net-undefine net00200600
sudo virsh net-destroy net00300600
sudo virsh net-undefine net00300600
sudo virsh net-destroy net00400500
sudo virsh net-undefine net00400500
sudo virsh net-destroy net00400501
sudo virsh net-undefine net00400501
sudo virsh net-destroy net00400700
sudo virsh net-undefine net00400700
sudo virsh net-destroy net00500700
sudo virsh net-undefine net00500700