From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgKon-0006Gx-Jc for qemu-devel@nongnu.org; Mon, 11 Jul 2011 14:02:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgKol-0005JR-GG for qemu-devel@nongnu.org; Mon, 11 Jul 2011 14:02:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgKok-0005JN-Tp for qemu-devel@nongnu.org; Mon, 11 Jul 2011 14:02:51 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6BI2nOs029082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 11 Jul 2011 14:02:49 -0400 From: Jes.Sorensen@redhat.com Date: Mon, 11 Jul 2011 20:01:09 +0200 Message-Id: <1310407269-13203-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH v3] QMP: add snapshot_blkdev command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: lcapitulino@redhat.com Cc: qemu-devel@nongnu.org From: Jes Sorensen 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. Signed-off-by: Jes Sorensen --- qmp-commands.hx | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 92c5c3a..2b9f6af 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -694,6 +694,41 @@ 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) + +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", -- 1.7.4.4