Re: RFC: Exposing backing chains in <domain> XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'>
>         <driver name='qemu' type='qcow2'/>
>         <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>

Libguestfs gets a disk image that we usually know nothing about.
Then we _either_:

 (1) Add it to libvirt XML directly.
 (2) Create an overlay on top of the disk image, and add the overlay
     to the libvirt XML.

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 file='disk.img'/>
       </backingStore>
     </disk>

Note not specifying disk.img's backing store (we don't know it).

Also, non-disk sources: nbd, iscsi, gluster, ceph etc.  It's
especially hard to discover what is in these since it may involve
multiple opens [breaks nbd sometimes], from multiple processes
[security context issues]; and network connections are slower than
opening a local file.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]