qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v1 1/3] provenance: QMP command to store Migrati


From: mrhines
Subject: [Qemu-devel] [RFC PATCH v1 1/3] provenance: QMP command to store MigrationInfo from JSON
Date: Tue, 18 Feb 2014 13:53:20 +0800

From: "Michael R. Hines" <address@hidden>

This is the QMP documentation and schema for a command that allows
the migration protocol on the destination side to 'install' a whole
MigrationInfo json structure as received in-tact from the source
into the MigrationState struct so that query-migrate can print the
information as-is without having to install the values one-by-one.

Signed-off-by: Michael R. Hines <address@hidden>
---
 qapi-schema.json | 14 ++++++++++++++
 qmp-commands.hx  | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/qapi-schema.json b/qapi-schema.json
index 7cfb5e5..c84ca0f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -717,6 +717,20 @@
   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
 
 ##
+# @migrate-set-last-info
+#
+# Store migration info/statistics. Currently only used by the migration
+# protocol itself to tell the destination about the results before
+# the source QEMU is destroyed.
+#
+# @info: json array of MigrationInfo statistics from a previous migration.
+#
+# Since: 2.0
+##
+{ 'command': 'migrate-set-last-info',
+  'data': { 'info': 'MigrationInfo' } }
+
+##
 # @query-migrate-capabilities
 #
 # Returns information about the current migration capabilities status
diff --git a/qmp-commands.hx b/qmp-commands.hx
index cce6b81..1108940 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -3015,6 +3015,39 @@ EQMP
         .params     = "capability:s,state:b",
        .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
     },
+
+SQMP
+migrate-set-last-info
+------------------------
+
+Store migration info/statistics. Currently only used by the migration
+protocol itself to tell the destination about the results before
+the source QEMU is destroyed.
+
+NOTE: There is no need to execute this command explicitly except for
+testing, as this information is already transmitted as part of the 
+migration protocol. Thus, there is no HMP command made available for
+this option - only QMP.
+
+The example below is simple, but the migration protocol will actually
+transfer the entire JSON string that originated from the source, no
+matter what is inside of it, which should survive future version of
+QEMU when new statistics are added to the protocol.
+
+Arguments:
+- info: MigrationInfo statistics dictionary (json-object)
+
+Example:
+
+-> { "execute": "migrate-set-last-info" , "arguments":
+     { "info": { "downtime": 1234, "ram" : { "transferred" : 5678 } } } }
+EQMP
+    {
+        .name       = "migrate-set-last-info",
+        .args_type  = "info:O",
+        .mhandler.cmd_new = qmp_marshal_input_migrate_set_last_info,
+    },
+
 SQMP
 query-migrate-capabilities
 --------------------------
-- 
1.8.1.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]