On 03/12/14 21:21, Eric Blake wrote: > tl;dr: > I am working on a series of patches to expose backing chain information > in <domain> XML. Comments are welcome, to make sure my XML design is on > the right track. > ... > Existing design > =============== ... > a domain, and recursively show the entire chain. Furthermore, there are > some formats that require multiple resources: for example, both qemu > 2.0's new quorum driver and HyperV VHDX images can have multiple backing With this in mind ... > files, and where these files can in turn have more backing images. > Thus, any proper representation of disk resources needs to show a full > tree of relationships. Thankfully, circular references in backing files > would form an invalid image (all known virtual disk image formats > require a DAG of relationships). ... > > Proposal > ======== > For each <disk> of a domain, I will be adding a new <backingStore> > element. The element is optional on input, which allows libvirt to > continue to understand input from older versions, but will always be > present on output, to show what libvirt is tracking as the backing chain. > > A backing chain of 3 files (base <- mid <- top) in the local file system: > > <disk type='file' device='disk'> > <driver name='qemu' type='qcow2'/> > <source file='/var/lib/libvirt/images/top.qcow2'/> > <backingStore type='file'> > <driver name='qemu' type='qcow2'/> ... we should add an attribute with the index of the backing chain element in the backing chain. This will: 1) allow easier user retrieval of the index to be used for block_rebase 2) allow us to avoid ambiguity when a backing chain will become a backing tree without the need to invent some kind of hierarchical indexing approach. Instead we can just number the backing elements in some (internal) fashion and expect the users to provide the correct index. > <source file='/var/lib/libvirt/images/mid.qcow2'/> > <backingStore type='file'> > <driver name='qemu' type='qcow2'/> > <source file='/var/lib/libvirt/images/base.qcow2'/> > <backingStore/> > </backingStore> > </backingStore> > <target dev='vda' bus='virtio'/> > </disk> > My first impression is good though. I will go through the design again tomorrow in a more in-depth way. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list