diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-01-18 14:40:46 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-01-26 14:49:14 +0100 |
commit | 12bd451fe0be83474910bb63b5874458141d4230 (patch) | |
tree | 2aec25bd837004ae1fac7a4951f824a7e0b2f9d7 /QMP | |
parent | 5094a6c016f6e7a4fc800816d716e10ce2331396 (diff) | |
download | qemu-12bd451fe0be83474910bb63b5874458141d4230.tar.gz qemu-12bd451fe0be83474910bb63b5874458141d4230.tar.bz2 qemu-12bd451fe0be83474910bb63b5874458141d4230.zip |
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contents
into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which
is emitted when image streaming completes. Later patches add control
over the background copy speed, cancelation, and querying running
streaming operations.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'QMP')
-rw-r--r-- | QMP/qmp-events.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index af586ec855..0cd2275c3b 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -264,3 +264,32 @@ Example: Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is followed respectively by the RESET, SHUTDOWN, or STOP events. + + +BLOCK_JOB_COMPLETED +------------------- + +Emitted when a block job has completed. + +Data: + +- "type": Job type ("stream" for image streaming, json-string) +- "device": Device name (json-string) +- "len": Maximum progress value (json-int) +- "offset": Current progress value (json-int) + On success this is equal to len. + On failure this is less than len. +- "speed": Rate limit, bytes per second (json-int) +- "error": Error message (json-string, optional) + Only present on failure. This field contains a human-readable + error message. There are no semantics other than that streaming + has failed and clients should not try to interpret the error + string. + +Example: + +{ "event": "BLOCK_JOB_COMPLETED", + "data": { "type": "stream", "device": "virtio-disk0", + "len": 10737418240, "offset": 10737418240, + "speed": 0 }, + "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } |