From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFRyJ-0001aF-BV for qemu-devel@nongnu.org; Thu, 28 Apr 2011 10:13:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFRyI-0005Oy-Au for qemu-devel@nongnu.org; Thu, 28 Apr 2011 10:13:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFRyH-0005Oq-Sg for qemu-devel@nongnu.org; Thu, 28 Apr 2011 10:13:34 -0400 From: Jes.Sorensen@redhat.com Date: Thu, 28 Apr 2011 16:12:45 +0200 Message-Id: <1303999965-2696-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: kwolf@redhat.com, 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 may be added with the name _async/-async. Signed-off-by: Jes Sorensen --- qmp-commands.hx | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index fbd98ee..24e9c3e 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -667,6 +667,44 @@ Example: EQMP { + .name = "blockdev-snapshot", + .args_type = "device:B,snapshot_file:s?,format:s?", + .params = "device [new-image-file] [format]", + .help = "initiates a live snapshot\n\t\t\t" + "of device. If a new image file is specified, the\n\t\t\t" + "new image file will become the new root image.\n\t\t\t" + "If format is specified, the snapshot file will\n\t\t\t" + "be created in that format. Otherwise the\n\t\t\t" + "snapshot will be internal! (currently unsupported)", + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_snapshot_blkdev, + }, + +SQMP +blockdev-snapshot-sync +---------------------- + +Synchronous snapshot of block device, using snapshot file as target, +if provided. + +Arguments: + +- "device": device name to snapshot (json-string) +- "snapshot_file": name of new image file (json-string) +- "format": format of now 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