From d9b902db3fb71fdcdfbb2aa9cc94a410dee864e5 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 18 Oct 2012 16:49:24 +0200 Subject: qmp: add drive-mirror command This adds the monitor commands that start the mirroring job. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- qapi-schema.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 8c4b7c808b..a066cd5ca2 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1606,6 +1606,40 @@ 'data': { 'device': 'str', '*base': 'str', 'top': 'str', '*speed': 'int' } } +## +# @drive-mirror +# +# Start mirroring a block device's writes to a new destination. +# +# @device: the name of the device whose writes should be mirrored. +# +# @target: the target of the new image. If the file exists, or if it +# is a device, the existing file/device will be used as the new +# destination. If it does not exist, a new file will be created. +# +# @format: #optional the format of the new destination, default is to +# probe if @mode is 'existing', else the format of the source +# +# @mode: #optional whether and how QEMU should create a new image, default is +# 'absolute-paths'. +# +# @speed: #optional the maximum speed, in bytes per second +# +# @sync: what parts of the disk image should be copied to the destination +# (all the disk, only the sectors allocated in the topmost image, or +# only new I/O). +# +# Returns: nothing on success +# If @device is not a valid block device, DeviceNotFound +# +# Since 1.3 +## +{ 'command': 'drive-mirror', + 'data': { 'device': 'str', 'target': 'str', '*format': 'str', + 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', + '*speed': 'int' } } + +## # @migrate_cancel # # Cancel the current executing migration process. -- cgit v1.2.3