On 02/20/2014 07:37 AM, Daniel P. Berrange wrote:
> 2) Export the image chain in the XML and allow to use indexed
disk names
> This option would require to export the backing chain in the XML in some
> way, either the existing disk source specification in multiple elements
> (which I don't like as it is a bit convoluted), or possibly again via URIs.
>
> Then the user would be allowed to specify vda[2] for the second backing
> image of the vda disk.
>
> With this the internal representations of the backing chain would be
> used without the need for the user to specify path.
To me this is more appealing because of its simplicity. I think I would
rather like us to expose the backing store info explicitly in the XML
if we go this route, so that the index values are explicitly visible to
apps using the XML.
As it is, I'd like to have the backing chain listed in XML for other
reasons - I'm losing track of how many times people have complained that
'virsh blockpull' isn't working, only to discover that they forgot to
set -obacking_fmt=qcow2 in their qemu-img calls that created their
backing chain, so libvirt was treating the backing file as raw instead
of as qcow2 for security reasons, and thus treating the chain as shorter
than what qemu wants to do. But without an obvious way to export what
libvirt thinks is the backing chain, it's harder to point this error out
to end users.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org