-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartVM.sh
More file actions
executable file
·41 lines (33 loc) · 820 Bytes
/
Copy pathstartVM.sh
File metadata and controls
executable file
·41 lines (33 loc) · 820 Bytes
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
#!/bin/bash
error_flag=0
# List of VM names to start
VM_NAMES=(
scanner-1-BLUE
scanner-2-ORANGE
scanner-3-GRAY
scanner-4-GREEN
scanner-5-WHITE
scanner-6-BLACK
scanner-7-YELLOW
scanner-8-CRIMSON
)
echo "Starting all VMs, please hold..."
echo ""
for vm in "${VM_NAMES[@]}"; do
echo "Starting $vm..."
virsh start "$vm" >/dev/null 2>&1
if [[ $? -eq 0 ]]; then
echo " $vm started."
else
echo "Failed to start $vm (might already be running)."
error_flag=1
fi
done
if [[ $error_flag -eq 1 ]]; then
echo ""
echo "One or more scanners failed to launch, It would be best to follow the debugging instructions."
echo "If you decide to do so, close out of the terminal before shutting down."
echo "Press 'Enter' to continue to program."
read -r _
fi
echo "All VMs processed."