migration: block incoming colo when capability is disabled
We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Message-Id: <20230428194928.1426370-11-vsementsov@yandex-team.ru> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
d70178a88f
commit
121ccedc2b
@ -210,6 +210,7 @@ children.0=childs0 \
|
||||
|
||||
3. On Secondary VM's QEMU monitor, issue command
|
||||
{"execute":"qmp_capabilities"}
|
||||
{"execute": "migrate-set-capabilities", "arguments": {"capabilities": [ {"capability": "x-colo", "state": true } ] } }
|
||||
{"execute": "nbd-server-start", "arguments": {"addr": {"type": "inet", "data": {"host": "0.0.0.0", "port": "9999"} } } }
|
||||
{"execute": "nbd-server-add", "arguments": {"device": "parent0", "writable": true } }
|
||||
|
||||
|
@ -398,6 +398,12 @@ int migration_incoming_enable_colo(void)
|
||||
return -ENOTSUP;
|
||||
#endif
|
||||
|
||||
if (!migrate_colo()) {
|
||||
error_report("ENABLE_COLO command come in migration stream, but c-colo "
|
||||
"capability is not set");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ram_block_discard_disable(true)) {
|
||||
error_report("COLO: cannot disable RAM discard");
|
||||
return -EBUSY;
|
||||
|
Loading…
Reference in New Issue
Block a user