From: Jiri Denemark
Date: Wed, 16 Apr 2014 13:28:10 +0000 (+0200)
Subject: conf: Output disk backing store details in domain XML
X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a2e369bc000126b6b0048ce1256c8cea00976f16;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git
conf: Output disk backing store details in domain XML
The XML for quite a longish backing chain is shown below:
Various disk types and formats can be mixed in one chain. The
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
---
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index e851f852a..93ee05c94 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1624,6 +1624,20 @@
</auth>
<target dev='vda' bus='virtio'/>
</disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/var/lib/libvirt/images/domain.qcow'/>
+ <backingStore type='file'>
+ <format type='qcow2'/>
+ <source file='/var/lib/libvirt/images/snapshot.qcow'/>
+ <backingStore type='block'>
+ <format type='raw'/>
+ <source dev='/dev/mapper/base'/>
+ <backingStore/>
+ </backingStore>
+ </backingStore>
+ <target dev='vda' bus='virtio'/>
+ </disk>
</devices>
...
@@ -1814,6 +1828,53 @@
This feature doesn't support migration currently.
+
backingStore
+
+ This element describes the backing store used by the disk specified by
+ sibling source element. It is currently ignored on input
+ and only used for output to describe the detected backing chains.
+ Since 1.2.4. An empty
+ backingStore element means the sibling source is
+ self-contained and is not based on any backing store. The following
+ attributes and sub-elements are supported in
+ backingStore:
+
+
type attribute
+
+ The type attribute represents the type of disk used
+ by the backing store, see disk type attribute above for more
+ details and possible values.
+
+
index attribute
+
+ This attribute is only valid in output (and ignored on input) and
+ it can be used to refer to a specific part of the disk chain when
+ doing block operations (such as via the
+ virDomainBlockRebase API). For example,
+ vda[2] refers to the backing store with
+ index='2' of the disk with vda target.
+
+
format sub-element
+
+ The format element contains type
+ attribute which specifies the internal format of the backing
+ store, such as raw or qcow2.
+
+
source sub-element
+
+ This element has the same structure as the source
+ element in disk. It specifies which file, device,
+ or network location contains the data of the described backing
+ store.
+
+
backingStore sub-element
+
+ If the backing store is not self-contained, the next element
+ in the chain is described by nested backingStore
+ element.
+