Re: [Qemu-devel] [PATCH 3/3] Add a new qmp command to do checkpoint, get replication error
On 12/01/2016 10:55 PM, Eric Blake wrote: On 12/01/2016 12:06 AM, Zhang Chen wrote: We can call this qmp command to do checkpoint outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- docs/qmp-commands.txt | 24 +++ 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 s/replicatin/replication/ OK. +# +# Returns: nothing +# +# Since: 2.8 You've missed 2.8. I will fix this in next version. +## +{ 'command': 'xen-get-replication-error' } + +## +# @xen-do-checkpoint +# +# Do checkpoint +# +# Returns: nothing +# +# Since: 2.8 Again, should be 2.9 I will fix this in next version. Thanks Zhang Chen +## +{ 'command': 'xen-do-checkpoint' } + +## # @GICCapability: # # The struct describes capability for a specific GIC (Generic -- Thanks zhangchen
Re: [Qemu-devel] [PATCH 3/3] Add a new qmp command to do checkpoint, get replication error
On 12/01/2016 12:06 AM, Zhang Chen wrote: > We can call this qmp command to do checkpoint outside of qemu. > Like Xen colo need this function. > > Signed-off-by: Zhang Chen > Signed-off-by: Wen Congyang > --- > docs/qmp-commands.txt | 24 > +++ 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 s/replicatin/replication/ > +# > +# Returns: nothing > +# > +# Since: 2.8 You've missed 2.8. > +## > +{ 'command': 'xen-get-replication-error' } > + > +## > +# @xen-do-checkpoint > +# > +# Do checkpoint > +# > +# Returns: nothing > +# > +# Since: 2.8 Again, should be 2.9 > +## > +{ 'command': 'xen-do-checkpoint' } > + > +## > # @GICCapability: > # > # The struct describes capability for a specific GIC (Generic > -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
[Qemu-devel] [PATCH 3/3] Add a new qmp command to do checkpoint, get replication error
We can call this qmp command to do checkpoint outside of qemu. Like Xen colo need this function. Signed-off-by: Zhang Chen Signed-off-by: Wen Congyang --- 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