libvirt/tests/qemublocktestdata/imagecreate/qcow2-backing-raw-nbd.json
Peter Krempa 47a12f2752 qemu: block: Use simple backing stores string format if possible
In case when the backing store can be represented with something
simpler such as a URI we can use it rather than falling back to the
json: pseudo-protocol.

In cases when it's not worth it (e.g. with the old ugly NBD or RBD
strings) let's switch to json.

The function is exported as we'll need it when overwriting the ugly
strings qemu would come up with during blockjobs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-07-25 13:21:32 +02:00

16 lines
258 B
JSON

protocol:
{
"driver": "file",
"filename": "/var/lib/libvirt/images/i.qcow2",
"size": 42
}
format:
{
"driver": "qcow2",
"file": "0123456789ABCDEF0123456789ABCDE",
"size": 1337,
"backing-file": "nbd://example.com:1234",
"backing-fmt": "raw"
}