aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-06 18:55:58 +0100
committerKevin Wolf <kwolf@redhat.com>2012-03-12 15:14:07 +0100
commitbc8b094feb61c5f3ad55113f1c9b3288dd843b10 (patch)
treeca553ea3a0a95fa7a9ccf48d001e90049c0cc0d9 /qmp-commands.hx
parent52e7c241ac766406f05fa331eec9dbb33ebd2640 (diff)
add mode field to blockdev-snapshot-sync transaction item
The mode field lets a management application create the snapshot destination outside QEMU. Right now, the only modes are "existing" and "absolute-paths". Mirroring introduces "no-backing-file". In the future "relative-paths" could be implemented too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx10
1 files changed, 10 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index fb4f1dff5f..7c03b622c1 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -705,6 +705,13 @@ A list of dictionaries is accepted, that contains the actions to be performed.
For snapshots this is the device, the file to use for the new snapshot,
and the format. The default format, if not specified, is qcow2.
+Each new snapshot defaults to being created by QEMU (wiping any
+contents if the file already exists), but it is also possible to reuse
+an externally-created file. In the latter case, you should ensure that
+the new image file has the same contents as the current one; QEMU cannot
+perform any meaningful check. Typically this is achieved by using the
+current image file as the backing file for the new image.
+
Arguments:
actions array:
@@ -715,6 +722,8 @@ actions 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)
+ - "mode": whether and how QEMU should create the snapshot file
+ (NewImageMode, optional, default "absolute-paths")
Example:
@@ -725,6 +734,7 @@ Example:
"format": "qcow2" } },
{ 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
"snapshot-file": "/some/place/my-image2",
+ "mode": "existing",
"format": "qcow2" } } ] } }
<- { "return": {} }