We can call this qmp command to do checkpoint outside of qemu. Like Xen colo need this function.
Signed-off-by: Zhang Chen <zhangchen.f...@cn.fujitsu.com> Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> --- docs/qmp-commands.txt | 24 ++++++++++++++++++++++++ migration/colo.c | 10 ++++++++++ qapi-schema.json | 22 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c6e8c43..1c7a887 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -449,6 +449,30 @@ Example: "arguments": {"enable": true, "primary": false} } <- { "return": {} } +xen-get-replication-error +------- + +Get replication error that occurs when vm is running + +Arguments: None + +Example: + +-> { "execute": "xen-get-replication-error" } +<- { "return": {} } + +xen-do-checkpoint +------- + +Do checkpoint + +Arguments: None + +Example: + +-> { "execute": "xen-do-checkpoint" } +<- { "return": {} } + migrate ------- diff --git a/migration/colo.c b/migration/colo.c index 007e699..92b2ef4 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -126,6 +126,16 @@ void qmp_xen_set_replication(bool enable, bool primary, } } +void qmp_xen_get_replication_error(Error **errp) + { + replication_get_error_all(errp); + } + +void qmp_xen_do_checkpoint(Error **errp) + { + replication_do_checkpoint_all(errp); + } + static void colo_send_message(QEMUFile *f, COLOMessage msg, Error **errp) { diff --git a/qapi-schema.json b/qapi-schema.json index 3658764..0a90c39 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4694,6 +4694,28 @@ 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } } ## +# @xen-get-replication-error +# +# Get replicatin error that occurs when the vm is running +# +# Returns: nothing +# +# Since: 2.8 +## +{ 'command': 'xen-get-replication-error' } + +## +# @xen-do-checkpoint +# +# Do checkpoint +# +# Returns: nothing +# +# Since: 2.8 +## +{ 'command': 'xen-do-checkpoint' } + +## # @GICCapability: # # The struct describes capability for a specific GIC (Generic -- 2.7.4