Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-04-15 Thread Daniel P. Berrange
On Sat, Apr 12, 2014 at 08:49:50PM -0600, Eric Blake wrote: On 03/12/2014 02:21 PM, 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. A backing

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-04-12 Thread Eric Blake
On 03/12/2014 02:21 PM, 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. A backing chain of 3 files (base - mid - top) in the local file system:

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Daniel P. Berrange
On Wed, Mar 12, 2014 at 05:34:17PM -0600, Eric Blake wrote: Hmm. Another feature coming down the pipes in qemu 2.0 is the ability to give an alias to any portion of the backing chain. Right now, we have an alias element tied to the disk as a whole (in qemu parlance, the device id), but some

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Daniel P. Berrange
On Wed, Mar 12, 2014 at 02:21:46PM -0600, Eric Blake wrote: # virsh vol-dumpxml --pool gluster img3 volume type='network' nameimg3/name keyvol1/img3/key ... target pathgluster://localhost/vol1/img3/path A shame we chose this representation instead of something that matched the

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 10:53:48AM +, Daniel P. Berrange wrote: On Wed, Mar 12, 2014 at 05:34:17PM -0600, Eric Blake wrote: Hmm. Another feature coming down the pipes in qemu 2.0 is the ability to give an alias to any portion of the backing chain. Right now, we have an alias element

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 11:07:21AM +, Daniel P. Berrange wrote: I understand why you chose to use nesting, but I can't say I like the appearance of nesting. I think that in the common case where we have a single non-branching chain, the XML structure is kind of unpleasant and would be

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Eric Blake
On 03/14/2014 05:07 AM, Daniel P. Berrange wrote: On Wed, Mar 12, 2014 at 02:21:46PM -0600, Eric Blake wrote: # virsh vol-dumpxml --pool gluster img3 volume type='network' nameimg3/name keyvol1/img3/key ... target pathgluster://localhost/vol1/img3/path A shame we chose this

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Daniel P. Berrange
On Fri, Mar 14, 2014 at 02:05:49PM +, Richard W.M. Jones wrote: On Fri, Mar 14, 2014 at 11:07:21AM +, Daniel P. Berrange wrote: I understand why you chose to use nesting, but I can't say I like the appearance of nesting. I think that in the common case where we have a single

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-14 Thread Eric Blake
On 03/14/2014 08:34 AM, Daniel P. Berrange wrote: I don't think we want todo that - there are genuine use cases where that is a reasonable thing todo. eg you can provide a raw file to a guest and that guest may genuinely want to format the virtual disk it received with some other format. We

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-13 Thread Eric Blake
On 03/12/2014 05:34 PM, Eric Blake wrote: Code-wise, I'm looking at splitting 'struct _virDomainDiskDef' into two parts. The outermost part is _virDomainDiskDef, which tracks anything tied to the guest view, or to the device as a whole (target, alias, address); the inner part is a new

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-13 Thread Eric Blake
[adding qemu-devel] Background to those new to the thread: Previously, libvirt has been tracking a lot of disk tunables alongside the active layer of a backing chain, without regards to any backing files in the chain. However, now that qemu supports named BDS nodes anywhere in the backing

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-13 Thread Richard W.M. Jones
On Wed, Mar 12, 2014 at 02:21:46PM -0600, Eric Blake wrote: This feature is being driven in part by https://bugzilla.redhat.com/show_bug.cgi?id=1069407 Also: https://bugzilla.redhat.com/show_bug.cgi?id=1011063 Perhaps this too? https://bugzilla.redhat.com/show_bug.cgi?id=921135 Rich. --

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-13 Thread Richard W.M. Jones
On Wed, Mar 12, 2014 at 02:21:46PM -0600, Eric Blake wrote: 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'

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-13 Thread Eric Blake
On 03/13/2014 05:18 PM, Richard W.M. Jones wrote: It seems like for (1) we don't need to change anything. For (2) we might add: disk type='file' device='disk' driver name='qemu' type='qcow2'/ source file='overlay.qcow2'/ backingStore type='file' source

[libvirt] RFC: Exposing backing chains in domain XML

2014-03-12 Thread Eric Blake
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. Purpose === Among other things, this will help us support Peter's proposal of enhancing the block-pull and block-commit

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-12 Thread Peter Krempa
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

Re: [libvirt] RFC: Exposing backing chains in domain XML

2014-03-12 Thread Eric Blake
On 03/12/2014 02:42 PM, Peter Krempa wrote: 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