-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathncmigrate
More file actions
executable file
·58 lines (48 loc) · 828 Bytes
/
ncmigrate
File metadata and controls
executable file
·58 lines (48 loc) · 828 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
target=c11node10
#target=10.5.147.210
file=$1
ram=$2
vcpu=$3
telnetport=$4
vncport=$5
listenport=$6
postcopy=$7
speed=$8
#speed=125
#speed=30
name=$9
background=off
#background=on
#mac=$3
# prepare incoming migration at target
# start vm
ssh $target /root/qemu/listen-daemon $file $ram $vcpu $telnetport $vncport $listenport $name
#if [ $file == "master.qcow2" ]; then
# telnetport=4436
#fi
# migrate
nc localhost $telnetport << EOF
migrate_set_capability postcopy $postcopy
migrate_set_capability postcopy-move-background $background
migrate_set_speed $speed
migrate tcp:$target:$listenport
EOF
echo
#info version
#info kvm
#sleep 5
# check if complete
#while
#do
# if complete
# stop vm
#nc localhost $telnetport << EOF
#info migrate
#info status
#EOF
#echo
#quit
#info migrate_capabilities
# fi
#done