X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qmp-commands.hx;h=fba15cdc3be2310878dedf2d3551687ae34982bf;hb=30c367ed446b6ea53245589a5cf373578ac075d7;hp=b17c46e0b1d108c816a2459999370ea65970e40c;hpb=f3ca508f00fa1cc295334fe8f8010cd6ea45bacd;p=qemu.git diff --git a/qmp-commands.hx b/qmp-commands.hx index b17c46e0b..fba15cdc3 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3239,4 +3239,59 @@ 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