aboutsummaryrefslogtreecommitdiffstats
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2011-07-11 20:01:09 +0200
committerLuiz Capitulino <lcapitulino@gmail.com>2011-07-21 16:48:11 -0300
commitd967b2f14f238c24264fa73d02e9b0dde0b19506 (patch)
tree5c0974fb716f4d25d28dca0f2e3a85088ded3d81 /qmp-commands.hx
parent6c916eda22e7ef180bb2dd183bbef85f9ff006c6 (diff)
QMP: add snapshot-blkdev-sync command
Add QMP bits for snapshot_blkdev command. This is the same as snapshot_blkdev in the human monitor. The command is synchronous. In the future async commands and or a break down of the functionality into multiple commands might be added. Also change the 'snapshot_file' argument to 'snapshot-file' in the human monitor, so that it matches QMP. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx34
1 files changed, 34 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 92c5c3a31..5d44edf4e 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -694,6 +694,40 @@ Example:
EQMP
{
+ .name = "blockdev-snapshot-sync",
+ .args_type = "device:B,snapshot-file:s?,format:s?",
+ .params = "device [new-image-file] [format]",
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = do_snapshot_blkdev,
+ },
+
+SQMP
+blockdev-snapshot-sync
+----------------------
+
+Synchronous snapshot of a block device. snapshot-file specifies the
+target of the new image. If the file exists, or if it is a device, the
+snapshot will be created in the existing file/device. If does not
+exist, a new file will be created. format specifies the format of the
+snapshot image, default is qcow2.
+
+Arguments:
+
+- "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-snapshot", "arguments": { "device": "ide-hd0",
+ "snapshot-file":
+ "/some/place/my-image",
+ "format": "qcow2" } }
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "balloon",
.args_type = "value:M",
.params = "target",