Lines Matching +full:host +full:- +full:command
1 COarse-grained LOck-stepping Virtual Machines for Non-stop Service
2 ----------------------------------------
8 See the COPYING file in the top-level directory.
14 application-agnostic software-implemented hardware fault tolerance,
15 also known as "non-stop service".
17 COLO (COarse-grained LOck-stepping) is a high availability solution.
45 +------------+ +-----------------------+ +------------------------+ +------------+
46 | | | HeartBeat +<----->+ HeartBeat | | |
47 | Primary VM | +-----------+-----------+ +-----------+------------+ |Secondary VM|
49 | | +-----------|-----------+ +-----------|------------+ | |
50 | | |QEMU +---v----+ | |QEMU +----v---+ | | |
52 | | | +--------+ | | +--------+ | | |
53 | | | +---------------+ | | +---------------+ | | |
54 | | | | VM Checkpoint +-------------->+ VM Checkpoint | | | |
55 | | | +---------------+ | | +---------------+ | | |
56 |Requests<--------------------------\ /-----------------\ /--------------------->Requests|
58 |Responses+---------------------\ /-|-|------------\ /-------------------------+Responses|
60 | | | +-----------+ | | | | | | | | | | +----------+ | | |
62 | | | | Manager +---------------------------->| Manager | | | |
63 | | | ++----------+ v v | | | | | v v | +---------++ | | |
64 | | | |+-----------+-+-+-++| | ++-+--+-+---------+ | | | |
68 | | | |+------------+---+-+| | +-----------------+ | | | |
69 +------------+ +-----------------------+ +------------------------+ +------------+
70 +------------+ | | | | +------------+
72 +------------+ | | | | +------------+
73 +---------------------------------------+ +----------------------------------------+
75 +---------------------------------------+ +----------------------------------------+
77 +--------------v+ +---------v---+--+ +------------------+ +v-------------+
79 +---------------+ +----------------+ +------------------+ +--------------+
89 availability. When the primary node suffers a hardware fail-stop failure,
97 For more details, please refer to docs/block-replication.txt.
107 Please refer to docs/colo-proxy.txt for more information.
111 by using 'x-colo-lost-heartbeat' command.
115 +-----------------+
119 +--------+--------+
121 | Main qmp command:
122 | migrate-set-capabilities with x-colo
126 +--------+--------+
130 +--------+--------+
132 | Main qmp command:
133 | x-colo-lost-heartbeat
137 +--------+--------+
141 +-----------------+
143 COLO use the qmp command to switch and report operation status.
144 The diagram just shows the main qmp command, you can get the detail
148 Note: Here we are running both instances on the same host for testing,
150 127.0.0.1 is the Primary Host and 127.0.0.2 is the Secondary Host.
159 # imagefolder="/mnt/vms/colo-test-primary"
161 # qemu-system-x86_64 -enable-kvm -cpu qemu64,kvmclock=on -m 512 -smp 1 -qmp stdio \
162 -device piix3-usb-uhci -device usb-tablet -name primary \
163 -netdev tap,id=hn0,vhost=off,helper=/usr/lib/qemu/qemu-bridge-helper \
164 -device rtl8139,id=e0,netdev=hn0 \
165 -chardev socket,id=mirror0,host=0.0.0.0,port=9003,server=on,wait=off \
166 -chardev socket,id=compare1,host=0.0.0.0,port=9004,server=on,wait=on \
167 -chardev socket,id=compare0,host=127.0.0.1,port=9001,server=on,wait=off \
168 -chardev socket,id=compare0-0,host=127.0.0.1,port=9001 \
169 -chardev socket,id=compare_out,host=127.0.0.1,port=9005,server=on,wait=off \
170 -chardev socket,id=compare_out0,host=127.0.0.1,port=9005 \
171 -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0 \
172 -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out \
173 -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0 \
174 -object iothread,id=iothread1 \
175 -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,\
177 -drive if=ide,id=colo-disk0,driver=quorum,read-pattern=fifo,vote-threshold=1,\
178 children.0.file.filename=$imagefolder/primary.qcow2,children.0.driver=qcow2 -S
185 # imagefolder="/mnt/vms/colo-test-secondary"
188 # qemu-img create -f qcow2 $imagefolder/secondary-active.qcow2 10G
190 # qemu-img create -f qcow2 $imagefolder/secondary-hidden.qcow2 10G
192 # qemu-system-x86_64 -enable-kvm -cpu qemu64,kvmclock=on -m 512 -smp 1 -qmp stdio \
193 -device piix3-usb-uhci -device usb-tablet -name secondary \
194 -netdev tap,id=hn0,vhost=off,helper=/usr/lib/qemu/qemu-bridge-helper \
195 -device rtl8139,id=e0,netdev=hn0 \
196 -chardev socket,id=red0,host=$primary_ip,port=9003,reconnect-ms=1000 \
197 -chardev socket,id=red1,host=$primary_ip,port=9004,reconnect-ms=1000 \
198 -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0 \
199 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 \
200 -object filter-rewriter,id=rew0,netdev=hn0,queue=all \
201 -drive if=none,id=parent0,file.filename=$imagefolder/primary.qcow2,driver=qcow2 \
202 -drive if=none,id=childs0,driver=replication,mode=secondary,file.driver=qcow2,\
203 top-id=colo-disk0,file.file.filename=$imagefolder/secondary-active.qcow2,\
204 file.backing.driver=qcow2,file.backing.file.filename=$imagefolder/secondary-hidden.qcow2,\
206 -drive if=ide,id=colo-disk0,driver=quorum,read-pattern=fifo,vote-threshold=1,\
208 -incoming tcp:0.0.0.0:9998
211 3. On Secondary VM's QEMU monitor, issue command
213 {"execute": "migrate-set-capabilities", "arguments": {"capabilities": [ {"capability": "x-colo", "s…
214 {"execute": "nbd-server-start", "arguments": {"addr": {"type": "inet", "data": {"host": "0.0.0.0", …
215 {"execute": "nbd-server-add", "arguments": {"device": "parent0", "writable": true } }
218 a. The qmp command nbd-server-start and nbd-server-add must be run
219 before running the qmp command migrate on primary QEMU
225 4. On Primary VM's QEMU monitor, issue command:
227 …-monitor-command", "arguments": {"command-line": "drive_add -n buddy driver=replication,mode=prima…
228 {"execute": "x-blockdev-change", "arguments":{"parent": "colo-disk0", "node": "replication0" } }
229 {"execute": "migrate-set-capabilities", "arguments": {"capabilities": [ {"capability": "x-colo", "s…
234 b. The qmp command line must be run after running qmp command line in
238 You can issue command '{ "execute": "migrate-set-parameters" , "arguments":{ "x-checkpoint-delay": …
253 {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "child": "children.1"} }
254 {"execute": "human-monitor-command", "arguments":{ "command-line": "drive_del replication0" } }
255 {"execute": "object-del", "arguments":{ "id": "comp0" } }
256 {"execute": "object-del", "arguments":{ "id": "iothread1" } }
257 {"execute": "object-del", "arguments":{ "id": "m0" } }
258 {"execute": "object-del", "arguments":{ "id": "redire0" } }
259 {"execute": "object-del", "arguments":{ "id": "redire1" } }
260 {"execute": "x-colo-lost-heartbeat" }
265 {"execute": "nbd-server-stop"}
266 {"execute": "x-colo-lost-heartbeat"}
268 {"execute": "object-del", "arguments":{ "id": "f2" } }
269 {"execute": "object-del", "arguments":{ "id": "f1" } }
270 {"execute": "chardev-remove", "arguments":{ "id": "red1" } }
271 {"execute": "chardev-remove", "arguments":{ "id": "red0" } }
273 …xecute": "chardev-add", "arguments":{ "id": "mirror0", "backend": {"type": "socket", "data": {"add…
274 …xecute": "chardev-add", "arguments":{ "id": "compare1", "backend": {"type": "socket", "data": {"ad…
275 …xecute": "chardev-add", "arguments":{ "id": "compare0", "backend": {"type": "socket", "data": {"ad…
276 …ecute": "chardev-add", "arguments":{ "id": "compare0-0", "backend": {"type": "socket", "data": {"a…
277 …cute": "chardev-add", "arguments":{ "id": "compare_out", "backend": {"type": "socket", "data": {"a…
278 …cute": "chardev-add", "arguments":{ "id": "compare_out0", "backend": {"type": "socket", "data": {"…
284 {"execute": "drive-mirror", "arguments":{ "device": "colo-disk0", "job-id": "resync", "target": "nb…
288 {"execute": "block-job-cancel", "arguments":{ "device": "resync"} }
290 …-monitor-command", "arguments":{ "command-line": "drive_add -n buddy driver=replication,mode=prima…
291 {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "replication0" } }
293 {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id": "m0", "netdev": "hn0", "…
294 {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire0", "netdev":…
295 {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire1", "netdev":…
296 {"execute": "object-add", "arguments":{ "qom-type": "iothread", "id": "iothread1" } }
297 {"execute": "object-add", "arguments":{ "qom-type": "colo-compare", "id": "comp0", "primary_in": "c…
299 {"execute": "migrate-set-capabilities", "arguments":{ "capabilities": [ {"capability": "x-colo", "s…
304 filters before the filter-rewriter by using the
313 {"execute": "drive-mirror", "arguments":{ "device": "colo-disk0", "job-id": "resync", "target": "nb…
317 {"execute": "block-job-cancel", "arguments":{ "device": "resync" } }
319 …-monitor-command", "arguments":{ "command-line": "drive_add -n buddy driver=replication,mode=prima…
320 {"execute": "x-blockdev-change", "arguments":{ "parent": "colo-disk0", "node": "replication0" } }
322 {"execute": "object-add", "arguments":{ "qom-type": "filter-mirror", "id": "m0", "insert": "before"…
323 {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire0", "insert":…
324 {"execute": "object-add", "arguments":{ "qom-type": "filter-redirector", "id": "redire1", "insert":…
325 {"execute": "object-add", "arguments":{ "qom-type": "iothread", "id": "iothread1" } }
326 {"execute": "object-add", "arguments":{ "qom-type": "colo-compare", "id": "comp0", "primary_in": "c…
328 {"execute": "migrate-set-capabilities", "arguments":{ "capabilities": [ {"capability": "x-colo", "s…