aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2012-02-28 15:54:07 -0500
committerKevin Wolf <kwolf@redhat.com>2012-02-29 15:48:39 +0100
commitc186402c444a9598a71da6aef1360f4171e57ad3 (patch)
treee38f4e6a5856e7ba29bd605139c2d73ccd2e4236 /qmp-commands.hx
parent8802d1fdd4b73e02ce13fb3a233c64c1913634ab (diff)
downloadqemu-c186402c444a9598a71da6aef1360f4171e57ad3.zip
qemu-c186402c444a9598a71da6aef1360f4171e57ad3.tar.gz
qemu-c186402c444a9598a71da6aef1360f4171e57ad3.tar.bz2
QMP: Add qmp command for blockdev-group-snapshot-sync
This adds the QMP command for blockdev-group-snapshot-sync. It takes an array in as the input, for the argument devlist. The array consists of the following elements: + device: device to snapshot. e.g. "ide-hd0", "virtio0" + snapshot-file: path & file for the snapshot image. e.g. "/tmp/file.img" + format: snapshot format. e.g., "qcow2". Optional There is no HMP equivalent for the command. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx39
1 files changed, 39 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 705f704..0c9bfac 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -686,6 +686,45 @@ EQMP
.args_type = "device:B",
.mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
},
+ {
+ .name = "blockdev-group-snapshot-sync",
+ .args_type = "devlist:O",
+ .params = "device:B,snapshot-file:s,format:s?",
+ .mhandler.cmd_new = qmp_marshal_input_blockdev_group_snapshot_sync,
+ },
+
+SQMP
+blockdev-group-snapshot-sync
+----------------------
+
+Synchronous snapshot of one or more block devices. A list array input
+is accepted, that contains the device and snapshot file information for
+each device in group. The default format, if not specified, is qcow2.
+
+If there is any failure creating or opening a new snapshot, all snapshots
+for the group are abandoned, and the original disks pre-snapshot attempt
+are used.
+
+
+Arguments:
+
+devlist array:
+ - "device": device name to snapshot (json-string)
+ - "snapshot-file": name of new image file (json-string)
+ - "format": format of new image (json-string, optional)
+
+Example:
+
+-> { "execute": "blockdev-group-snapshot-sync", "arguments":
+ { "devlist": [{ "device": "ide-hd0",
+ "snapshot-file": "/some/place/my-image",
+ "format": "qcow2" },
+ { "device": "ide-hd1",
+ "snapshot-file": "/some/place/my-image2",
+ "format": "qcow2" }] } }
+<- { "return": {} }
+
+EQMP
{
.name = "blockdev-snapshot-sync",