diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-09-23 15:26:03 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:50:01 +0200 |
commit | d26c9a15738147a8dccc451c6f6d1ddc2305713d (patch) | |
tree | 83d344a0f859eeccc9f259e77f16b86f754ea561 /qmp-commands.hx | |
parent | 2d246f01d374c1a10c48c45aa931aa18f0a56634 (diff) |
blockdev: 'blockdev-add' QMP command
For examples see the changes to qmp-commands.hx.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index b17c46e0b1..fba15cdc3b 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3240,3 +3240,58 @@ Example: } EQMP + + { + .name = "blockdev-add", + .args_type = "options:q", + .mhandler.cmd_new = qmp_marshal_input_blockdev_add, + }, + +SQMP +blockdev-add +------------ + +Add a block device. + +Arguments: + +- "options": block driver options + +Example (1): + +-> { "execute": "blockdev-add", + "arguments": { "options" : { "driver": "qcow2", + "file": { "driver": "file", + "filename": "test.qcow2" } } } } +<- { "return": {} } + +Example (2): + +-> { "execute": "blockdev-add", + "arguments": { + "options": { + "driver": "qcow2", + "id": "my_disk", + "discard": "unmap", + "cache": { + "direct": true, + "writeback": true + }, + "file": { + "driver": "file", + "filename": "/tmp/test.qcow2" + }, + "backing": { + "driver": "raw", + "file": { + "driver": "file", + "filename": "/dev/fdset/4" + } + } + } + } + } + +<- { "return": {} } + +EQMP |