On Fri, Jul 15, 2016 at 13:11:16 -0600, Eric Blake wrote:
On 07/15/2016 07:49 AM, Daniel P. Berrange wrote:
> On Fri, Jul 15, 2016 at 03:46:33PM +0200, Peter Krempa wrote:
>> Libvirt didn't handle this for a long time and VMs with such config would
not
>> start we should implement it.
>>
>> Using JSON is basically the only option to specify advanced configuration for a
>> backing file.
>>
>> Field names were taken from qemu's source since there isn't really
>> documentation for this.
>
> Actually, this syntax is formally specified via QEMU QAPI schema
> language. In particular for block device options see $QEMU/qapi/block-core.json
Except that it is incomplete; as long as BlockdevOptions doesn't cover
and wrong in some cases:
ftp,http and others implemented by curl use the 'url' filed but the
documentation still hints that 'filename' is used while the driver does
not allow it.
$ qemu-img create -f qcow2 -b 'json: { "file.driver":"http",
"file.filename":"http://..." }' bla.img
qemu-img: bla.img: curl block driver requires an 'url' option
every driver, such as NBD, gluster, and sheepdog, there are still
some
Drivers such as NBD and SSH are actually implemented but not documented.
und(er)ocumented aspects.
Mostly how this maps to the JSON pseudo-protocol as blockdev add uses
nested JSON objects whereas the JSON protocol requires the fileds in the
"flattened" form.
The code looks like the only credible source in this case.
Peter