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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
hypervisor: 0.972
peripherals: 0.962
graphic: 0.960
register: 0.958
KVM: 0.958
TCG: 0.955
semantic: 0.952
VMM: 0.951
vnc: 0.951
virtual: 0.946
performance: 0.944
debug: 0.943
x86: 0.942
architecture: 0.937
ppc: 0.934
device: 0.933
PID: 0.932
permissions: 0.929
i386: 0.925
assembly: 0.924
arm: 0.918
user-level: 0.917
risc-v: 0.906
files: 0.876
mistranslation: 0.871
network: 0.865
socket: 0.848
boot: 0.823
kernel: 0.812
qemu-system-x86_64: Live Migration fails with BLOCK_JOB_ERROR
Description of problem:
After disk migration is completed and RAM migration is being performed, migration status switches to 'pre-switchover'.
In the 'pre-switchover' migration state, block jobs status is still set to 'ready' instead of 'running'
on queried for block job status when 'offset' and 'length' diverged. Thus, It results in BLOCK_JOB_ERROR.
Steps to reproduce:
On source host
1. Add disk(s) that needed to be migrated by issuing 'blockdev-add' QMP command.
2. start blockdev-mirror operations to perform disk(s) transfer by issuing QMP command
3. start RAM migration. (send HMP commands - listed below
4. Migration status changed to 'pre-switchover'. While in 'pre-switchover', check for disk activity
While RAM migration is happening, Migration status is changed to 'pre-switchover'
and observe that block jobs 'offset' and 'length' diverged. But, block job status is still set to 'ready' instead of 'running'.
On destination host
1. Launch the VM in listening mode (-incoming) for migrations
2. start NBD server
3. add disks to NBD server.
4. set migration parameters by sending HMP commands
Additional information:
# On SOURCE Host, start all blockdev-add operations
# Issue QMP commands (blockdev-add) for all block devices ("drive-scsi-disk-0" and "drive-scsi-disk-1") of VM
```
{
"execute" => "blockdev-add",
"arguments" => {
"driver" => "raw",
"node-name" => "node_drive-scsi-disk-0",
"auto-read-only" => false,
"read-only" => false,
"file" => {
"driver" => "nbd",
"export" => "drive-scsi-disk-0",
"server" => {
"type" => "inet",
"host" => "2600:3c0f:17:14::21",
"port" => "37552",
},
"tls-creds" => "tlscreds0"
}
}
}
```
{
"execute" => "blockdev-add",
"arguments" => {
"driver" => "raw",
"node-name" => "node_drive-scsi-disk-1",
"auto-read-only" => false,
"read-only" => false,
"file" => {
"driver" => "nbd",
"export" => "drive-scsi-disk-1",
"server" => {
"type" => "inet",
"host" => "2600:3c0f:17:14::21",
"port" => "37552",
},
"tls-creds" => "tlscreds0"
}
}
}
# On SOURCE Host, start all blockdev-mirror operations to start disk transfer
# i.e Issue QMP commands (blockdev-mirror) for each of those block devices ("drive-scsi-disk-0" and "drive-scsi-disk-1")
```
{
"execute" => "blockdev-mirror",
"arguments" => {
"device" => "drive-scsi-disk0",
"target" => "node_drive-scsi-disk-0",
"speed" => 100000000,
"sync" => "full",
}
}
```
```
{
"execute" => "blockdev-mirror",
"arguments" => {
"device" => "drive-scsi-disk1",
"target" => "node_drive-scsi-disk-1",
"speed" => 100000000,
"sync" => "full",
}
}
```
# NBD server configuration on destination host by issuing QMP command
# Start NBD server
```
{
"execute" => "nbd-server-start",
"arguments" => {
"addr" => {
"type" => "inet",
"data" => {
"host" => "2600:3c0f:17:14::21",
"port" => "37552"
}
},
"tls-creds" => "tlscreds0"
}
}
```
# On DESTINATION Host
# Register incoming disks(2) with NBD server by issuing QMP commands to VM on the destination host
# Disk# 1
```
{
"execute" => "nbd-server-add",
"arguments" => {
"device" => "drive-scsi-disk0",
"writable" => true
}
}
```
# Disk# 2
```
{
"execute" => "nbd-server-add",
"arguments" => {
"device" => "drive-scsi-disk1",
"writable" => true
}
}
```
# Wait for disks to finish the bulk of the data migration.
#
|