summaryrefslogtreecommitdiff
path: root/qapi-schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json29
1 files changed, 29 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index f33fe002fe..0ed39f360f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1070,3 +1070,32 @@
# Since: 0.14.0
##
{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
+
+##
+# @blockdev-snapshot-sync
+#
+# Generates a synchronous snapshot of a block device.
+#
+# @device: the name of the device to generate the snapshot from.
+#
+# @snapshot-file: 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: #optional the format of the snapshot image, default is 'qcow2'.
+#
+# Returns: nothing on success
+# If @device is not a valid block device, DeviceNotFound
+# If @snapshot-file can't be opened, OpenFileFailed
+# If @format is invalid, InvalidBlockFormat
+#
+# Notes: One of the last steps taken by this command is to close the current
+# image being used by @device and open the @snapshot-file one. If that
+# fails, the command will try to reopen the original image file. If
+# that also fails OpenFileFailed will be returned and the guest may get
+# unexpected errors.
+#
+# Since 0.14.0
+##
+{ 'command': 'blockdev-snapshot-sync',
+ 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str' } }