]> xenbits.xensource.com Git - libvirt.git/commit
conf: Output disk backing store details in domain XML
authorJiri Denemark <jdenemar@redhat.com>
Wed, 16 Apr 2014 13:28:10 +0000 (15:28 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 24 Apr 2014 14:06:13 +0000 (16:06 +0200)
commita2e369bc000126b6b0048ce1256c8cea00976f16
treec8136d3bc61503e35abac672c548f73e92d1596a
parent27b2b987bf41ba1ba3aab8c8d9b2d8bc740fd925
conf: Output disk backing store details in domain XML

The XML for quite a longish backing chain is shown below:

  <disk type='network' device='disk'>
    <driver name='qemu' type='qcow2'/>
    <source protocol='nbd' name='bar'>
      <host transport='unix' socket='/var/run/nbdsock'/>
    </source>
    <backingStore type='block' index='1'>
      <format type='qcow2'/>
      <source dev='/dev/HostVG/QEMUGuest1'/>
      <backingStore type='file' index='2'>
        <format type='qcow2'/>
        <source file='/tmp/image2.qcow'/>
        <backingStore type='file' index='3'>
          <format type='qcow2'/>
          <source file='/tmp/image3.qcow'/>
          <backingStore type='file' index='4'>
            <format type='qcow2'/>
            <source file='/tmp/image4.qcow'/>
            <backingStore type='file' index='5'>
              <format type='qcow2'/>
              <source file='/tmp/image5.qcow'/>
              <backingStore type='file' index='6'>
                <format type='raw'/>
                <source file='/tmp/Fedora-17-x86_64-Live-KDE.iso'/>
                <backingStore/>
              </backingStore>
            </backingStore>
          </backingStore>
        </backingStore>
      </backingStore>
    </backingStore>
    <target dev='vdb' bus='virtio'/>
  </disk>

Various disk types and formats can be mixed in one chain. The
<backingStore/> empty element marks the end of the backing chain and it
is there mostly for future support of parsing the chain provided by a
user. If it's missing, we are supposed to probe for the rest of the
chain ourselves, otherwise complete chain was provided by the user. The
index attributes of backingStore elements can be used to unambiguously
identify a specific part of the image chain.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
tests/domainschemadata/backing-chains.xml [new file with mode: 0644]