[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/27] QMP: Add qmp command for blockdev-group-snaps
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 18/27] QMP: Add qmp command for blockdev-group-snapshot-sync |
Date: |
Wed, 29 Feb 2012 16:17:59 +0100 |
From: Jeff Cody <address@hidden>
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 <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qmp-commands.hx | 39 +++++++++++++++++++++++++++++++++++++++
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",
--
1.7.6.5
- [Qemu-devel] [PULL 00/27] Block patches, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 04/27] fdc: handle read-only floppies (abort early on write commands), Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 03/27] fdc: most control commands do not generate interrupts, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 08/27] fdc: check if media rate is correct before doing any transfer, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 09/27] fdc: fix seek command, which shouldn't check tracks, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 02/27] fdc: set busy bit when starting a command, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 12/27] qcow2: Fix build with DEBUG_EXT enabled, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 18/27] QMP: Add qmp command for blockdev-group-snapshot-sync,
Kevin Wolf <=
- [Qemu-devel] [PATCH 01/27] fdc: take side count into account, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 10/27] fdc: DIR (Digital Input Register) should return status of current drive..., Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 16/27] qcow2: Reject too large header extensions, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 14/27] block: drop aio_multiwrite in BlockDriver, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 11/27] ide: fail I/O to empty disk, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 22/27] qemu-iotests: Filter out DOS line endings, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 13/27] block: remove unused fields in BlockDriverState, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 15/27] qcow2: Fix offset in qcow2_read_extensions, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 06/27] block: add a transfer rate for floppy types, Kevin Wolf, 2012/02/29
- [Qemu-devel] [PATCH 07/27] fdc: add a 'check media rate' property. Not used yet, Kevin Wolf, 2012/02/29