summaryrefslogtreecommitdiff
path: root/others/vm3/compute/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'others/vm3/compute/start.sh')
-rwxr-xr-xothers/vm3/compute/start.sh20
1 files changed, 0 insertions, 20 deletions
diff --git a/others/vm3/compute/start.sh b/others/vm3/compute/start.sh
deleted file mode 100755
index d64dbb1..0000000
--- a/others/vm3/compute/start.sh
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/bash
2
3# starts vm
4# remove seed.iso first if vm have the seed iso
5
6vmname=$1
7
8# Get the target device for seed.iso
9target_dev=$(sudo virsh domblklist $vmname | grep 'seed.iso' | awk '{print $1}')
10
11# If seed.iso is found, detach it,
12# --config means it is persistent but do not affect the state now.
13# --config --live means online remove
14# no option means that the changes are not persistent
15#
16if [ ! -z "$target_dev" ]; then
17 sudo virsh detach-disk $vmname $target_dev --config
18fi
19
20sudo virsh start $vmname