[PATCH 20/55] conf: domain: Format out user provided backing chains in XML

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

 



If a user configures the backing chain in the XML we should not ignore
it. We already do parse it but don't format it out. As a
safety-precaution don't attempt to format detected chain into the
inactive XML.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.c                             |  8 ++-
 .../disk-backing-chains-inactive.xml               | 35 ++++++++++
 .../disk-backing-chains-index-active.xml           | 80 ++++++++++++++++++++++
 .../disk-backing-chains-index-inactive.xml         | 80 ++++++++++++++++++++++
 .../disk-backing-chains-noindex-active.xml         | 80 ++++++++++++++++++++++
 .../disk-backing-chains-noindex-inactive.xml       | 80 ++++++++++++++++++++++
 tests/qemuxml2xmloutdata/disk-mirror-inactive.xml  |  4 ++
 .../disk-mirror-old-inactive.xml                   |  4 ++
 8 files changed, 369 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7dcbe8a20b..82e47464f2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -23702,10 +23702,15 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
                                 unsigned int flags)
 {
     const char *format;
+    bool inactive = flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE;

     if (!backingStore)
         return 0;

+    /* don't write detected backing chain members to inactive xml */
+    if (inactive && backingStore->detected)
+        return 0;
+
     if (backingStore->type == VIR_STORAGE_TYPE_NONE) {
         virBufferAddLit(buf, "<backingStore/>\n");
         return 0;
@@ -23971,8 +23976,7 @@ virDomainDiskDefFormat(virBufferPtr buf,

     /* Don't format backingStore to inactive XMLs until the code for
      * persistent storage of backing chains is ready. */
-    if (!(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE) &&
-        virDomainDiskBackingStoreFormat(buf, def->src->backingStore,
+    if (virDomainDiskBackingStoreFormat(buf, def->src->backingStore,
                                         xmlopt, flags) < 0)
         return -1;

diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-inactive.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-inactive.xml
index a9db12ba4d..c1af58ff6f 100644
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-inactive.xml
+++ b/tests/qemuxml2xmloutdata/disk-backing-chains-inactive.xml
@@ -19,6 +19,10 @@
       <source protocol='gluster' name='Volume2/Image'>
         <host transport='unix' socket='/path/to/sock'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/missing-backing-store.qcow'/>
+      </backingStore>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
@@ -27,6 +31,31 @@
       <source protocol='nbd' name='bar'>
         <host transport='unix' socket='/var/run/nbdsock'/>
       </source>
+      <backingStore type='block'>
+        <format type='qcow2'/>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <backingStore type='file'>
+          <format type='qcow2'/>
+          <source file='/tmp/image2.qcow'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/tmp/image3.qcow'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/tmp/image4.qcow'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/tmp/image5.qcow'/>
+                <backingStore type='file'>
+                  <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'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
@@ -35,6 +64,7 @@
       <source protocol='gluster' name='Volume1/Image'>
         <host name='example.org' port='6000'/>
       </source>
+      <backingStore/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
@@ -48,6 +78,11 @@
         <host name='mon2.example.org' port='6322'/>
         <host name='mon3.example.org' port='6322'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/image.qcow'/>
+        <backingStore/>
+      </backingStore>
       <target dev='vdd' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.xml
index db70ae2b53..724afa4e83 100644
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.xml
+++ b/tests/qemuxml2xmloutdata/disk-backing-chains-index-active.xml
@@ -19,6 +19,10 @@
       <source protocol='gluster' name='Volume2/Image'>
         <host transport='unix' socket='/path/to/sock'/>
       </source>
+      <backingStore type='file' index='1'>
+        <format type='qcow2'/>
+        <source file='/tmp/missing-backing-store.qcow'/>
+      </backingStore>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
@@ -27,6 +31,31 @@
       <source protocol='nbd' name='bar'>
         <host transport='unix' socket='/var/run/nbdsock'/>
       </source>
+      <backingStore type='block' index='8'>
+        <format type='qcow2'/>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <backingStore type='file' index='7'>
+          <format type='vmdk'/>
+          <source file='/tmp/image2'/>
+          <backingStore type='file' index='6'>
+            <format type='qcow2'/>
+            <source file='/tmp/image3.qcow'/>
+            <backingStore type='file' index='5'>
+              <format type='qcow2'/>
+              <source file='/tmp/image4.qcow'/>
+              <backingStore type='file' index='4'>
+                <format type='qcow2'/>
+                <source file='/tmp/image5.qcow'/>
+                <backingStore type='file' index='3'>
+                  <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'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
@@ -35,6 +64,7 @@
       <source protocol='gluster' name='Volume1/Image'>
         <host name='example.org' port='6000'/>
       </source>
+      <backingStore/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
@@ -48,6 +78,11 @@
         <host name='mon2.example.org' port='6322'/>
         <host name='mon3.example.org' port='6322'/>
       </source>
+      <backingStore type='file' index='11'>
+        <format type='qcow2'/>
+        <source file='/tmp/image.qcow'/>
+        <backingStore/>
+      </backingStore>
       <target dev='vdd' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </disk>
@@ -60,6 +95,51 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/var/lib/libvirt/images/rhel7.1484071880'/>
+      <backingStore type='file' index='24'>
+        <format type='qcow2'/>
+        <source file='/var/lib/libvirt/images/rhel7.1484071877'/>
+        <backingStore type='file' index='23'>
+          <format type='qcow2'/>
+          <source file='/var/lib/libvirt/images/rhel7.1484071876'/>
+          <backingStore type='file' index='22'>
+            <format type='qcow2'/>
+            <source file='/var/lib/libvirt/images/rhel7.1484071872'/>
+            <backingStore type='file' index='21'>
+              <format type='qcow2'/>
+              <source file='/var/lib/libvirt/images/rhel7.1483615252'/>
+              <backingStore type='file' index='20'>
+                <format type='qcow2'/>
+                <source file='/var/lib/libvirt/images/rhel7.1483605924'/>
+                <backingStore type='file' index='19'>
+                  <format type='qcow2'/>
+                  <source file='/var/lib/libvirt/images/rhel7.1483605920'/>
+                  <backingStore type='file' index='18'>
+                    <format type='qcow2'/>
+                    <source file='/var/lib/libvirt/images/rhel7.1483546244'/>
+                    <backingStore type='file' index='17'>
+                      <format type='qcow2'/>
+                      <source file='/var/lib/libvirt/images/rhel7.1483545901'/>
+                      <backingStore type='file' index='16'>
+                        <format type='qcow2'/>
+                        <source file='/var/lib/libvirt/images/rhel7.1483545313'/>
+                        <backingStore type='file' index='15'>
+                          <format type='qcow2'/>
+                          <source file='/var/lib/libvirt/images/rhel7.1483536402'/>
+                          <backingStore type='file' index='14'>
+                            <format type='qcow2'/>
+                            <source file='/var/lib/libvirt/images/rhel7.qcow2'/>
+                            <backingStore/>
+                          </backingStore>
+                        </backingStore>
+                      </backingStore>
+                    </backingStore>
+                  </backingStore>
+                </backingStore>
+              </backingStore>
+            </backingStore>
+          </backingStore>
+        </backingStore>
+      </backingStore>
       <target dev='vdf' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.xml
index db70ae2b53..29d1ad002d 100644
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.xml
+++ b/tests/qemuxml2xmloutdata/disk-backing-chains-index-inactive.xml
@@ -19,6 +19,10 @@
       <source protocol='gluster' name='Volume2/Image'>
         <host transport='unix' socket='/path/to/sock'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/missing-backing-store.qcow'/>
+      </backingStore>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
@@ -27,6 +31,31 @@
       <source protocol='nbd' name='bar'>
         <host transport='unix' socket='/var/run/nbdsock'/>
       </source>
+      <backingStore type='block'>
+        <format type='qcow2'/>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <backingStore type='file'>
+          <format type='vmdk'/>
+          <source file='/tmp/image2'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/tmp/image3.qcow'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/tmp/image4.qcow'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/tmp/image5.qcow'/>
+                <backingStore type='file'>
+                  <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'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
@@ -35,6 +64,7 @@
       <source protocol='gluster' name='Volume1/Image'>
         <host name='example.org' port='6000'/>
       </source>
+      <backingStore/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
@@ -48,6 +78,11 @@
         <host name='mon2.example.org' port='6322'/>
         <host name='mon3.example.org' port='6322'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/image.qcow'/>
+        <backingStore/>
+      </backingStore>
       <target dev='vdd' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </disk>
@@ -60,6 +95,51 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/var/lib/libvirt/images/rhel7.1484071880'/>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/var/lib/libvirt/images/rhel7.1484071877'/>
+        <backingStore type='file'>
+          <format type='qcow2'/>
+          <source file='/var/lib/libvirt/images/rhel7.1484071876'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/var/lib/libvirt/images/rhel7.1484071872'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/var/lib/libvirt/images/rhel7.1483615252'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/var/lib/libvirt/images/rhel7.1483605924'/>
+                <backingStore type='file'>
+                  <format type='qcow2'/>
+                  <source file='/var/lib/libvirt/images/rhel7.1483605920'/>
+                  <backingStore type='file'>
+                    <format type='qcow2'/>
+                    <source file='/var/lib/libvirt/images/rhel7.1483546244'/>
+                    <backingStore type='file'>
+                      <format type='qcow2'/>
+                      <source file='/var/lib/libvirt/images/rhel7.1483545901'/>
+                      <backingStore type='file'>
+                        <format type='qcow2'/>
+                        <source file='/var/lib/libvirt/images/rhel7.1483545313'/>
+                        <backingStore type='file'>
+                          <format type='qcow2'/>
+                          <source file='/var/lib/libvirt/images/rhel7.1483536402'/>
+                          <backingStore type='file'>
+                            <format type='qcow2'/>
+                            <source file='/var/lib/libvirt/images/rhel7.qcow2'/>
+                            <backingStore/>
+                          </backingStore>
+                        </backingStore>
+                      </backingStore>
+                    </backingStore>
+                  </backingStore>
+                </backingStore>
+              </backingStore>
+            </backingStore>
+          </backingStore>
+        </backingStore>
+      </backingStore>
       <target dev='vdf' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-active.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-active.xml
index db70ae2b53..29d1ad002d 100644
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-active.xml
+++ b/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-active.xml
@@ -19,6 +19,10 @@
       <source protocol='gluster' name='Volume2/Image'>
         <host transport='unix' socket='/path/to/sock'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/missing-backing-store.qcow'/>
+      </backingStore>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
@@ -27,6 +31,31 @@
       <source protocol='nbd' name='bar'>
         <host transport='unix' socket='/var/run/nbdsock'/>
       </source>
+      <backingStore type='block'>
+        <format type='qcow2'/>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <backingStore type='file'>
+          <format type='vmdk'/>
+          <source file='/tmp/image2'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/tmp/image3.qcow'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/tmp/image4.qcow'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/tmp/image5.qcow'/>
+                <backingStore type='file'>
+                  <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'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
@@ -35,6 +64,7 @@
       <source protocol='gluster' name='Volume1/Image'>
         <host name='example.org' port='6000'/>
       </source>
+      <backingStore/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
@@ -48,6 +78,11 @@
         <host name='mon2.example.org' port='6322'/>
         <host name='mon3.example.org' port='6322'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/image.qcow'/>
+        <backingStore/>
+      </backingStore>
       <target dev='vdd' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </disk>
@@ -60,6 +95,51 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/var/lib/libvirt/images/rhel7.1484071880'/>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/var/lib/libvirt/images/rhel7.1484071877'/>
+        <backingStore type='file'>
+          <format type='qcow2'/>
+          <source file='/var/lib/libvirt/images/rhel7.1484071876'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/var/lib/libvirt/images/rhel7.1484071872'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/var/lib/libvirt/images/rhel7.1483615252'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/var/lib/libvirt/images/rhel7.1483605924'/>
+                <backingStore type='file'>
+                  <format type='qcow2'/>
+                  <source file='/var/lib/libvirt/images/rhel7.1483605920'/>
+                  <backingStore type='file'>
+                    <format type='qcow2'/>
+                    <source file='/var/lib/libvirt/images/rhel7.1483546244'/>
+                    <backingStore type='file'>
+                      <format type='qcow2'/>
+                      <source file='/var/lib/libvirt/images/rhel7.1483545901'/>
+                      <backingStore type='file'>
+                        <format type='qcow2'/>
+                        <source file='/var/lib/libvirt/images/rhel7.1483545313'/>
+                        <backingStore type='file'>
+                          <format type='qcow2'/>
+                          <source file='/var/lib/libvirt/images/rhel7.1483536402'/>
+                          <backingStore type='file'>
+                            <format type='qcow2'/>
+                            <source file='/var/lib/libvirt/images/rhel7.qcow2'/>
+                            <backingStore/>
+                          </backingStore>
+                        </backingStore>
+                      </backingStore>
+                    </backingStore>
+                  </backingStore>
+                </backingStore>
+              </backingStore>
+            </backingStore>
+          </backingStore>
+        </backingStore>
+      </backingStore>
       <target dev='vdf' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-inactive.xml b/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-inactive.xml
index db70ae2b53..29d1ad002d 100644
--- a/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-inactive.xml
+++ b/tests/qemuxml2xmloutdata/disk-backing-chains-noindex-inactive.xml
@@ -19,6 +19,10 @@
       <source protocol='gluster' name='Volume2/Image'>
         <host transport='unix' socket='/path/to/sock'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/missing-backing-store.qcow'/>
+      </backingStore>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
@@ -27,6 +31,31 @@
       <source protocol='nbd' name='bar'>
         <host transport='unix' socket='/var/run/nbdsock'/>
       </source>
+      <backingStore type='block'>
+        <format type='qcow2'/>
+        <source dev='/dev/HostVG/QEMUGuest1'/>
+        <backingStore type='file'>
+          <format type='vmdk'/>
+          <source file='/tmp/image2'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/tmp/image3.qcow'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/tmp/image4.qcow'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/tmp/image5.qcow'/>
+                <backingStore type='file'>
+                  <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'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
@@ -35,6 +64,7 @@
       <source protocol='gluster' name='Volume1/Image'>
         <host name='example.org' port='6000'/>
       </source>
+      <backingStore/>
       <target dev='vdc' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </disk>
@@ -48,6 +78,11 @@
         <host name='mon2.example.org' port='6322'/>
         <host name='mon3.example.org' port='6322'/>
       </source>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/tmp/image.qcow'/>
+        <backingStore/>
+      </backingStore>
       <target dev='vdd' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </disk>
@@ -60,6 +95,51 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2'/>
       <source file='/var/lib/libvirt/images/rhel7.1484071880'/>
+      <backingStore type='file'>
+        <format type='qcow2'/>
+        <source file='/var/lib/libvirt/images/rhel7.1484071877'/>
+        <backingStore type='file'>
+          <format type='qcow2'/>
+          <source file='/var/lib/libvirt/images/rhel7.1484071876'/>
+          <backingStore type='file'>
+            <format type='qcow2'/>
+            <source file='/var/lib/libvirt/images/rhel7.1484071872'/>
+            <backingStore type='file'>
+              <format type='qcow2'/>
+              <source file='/var/lib/libvirt/images/rhel7.1483615252'/>
+              <backingStore type='file'>
+                <format type='qcow2'/>
+                <source file='/var/lib/libvirt/images/rhel7.1483605924'/>
+                <backingStore type='file'>
+                  <format type='qcow2'/>
+                  <source file='/var/lib/libvirt/images/rhel7.1483605920'/>
+                  <backingStore type='file'>
+                    <format type='qcow2'/>
+                    <source file='/var/lib/libvirt/images/rhel7.1483546244'/>
+                    <backingStore type='file'>
+                      <format type='qcow2'/>
+                      <source file='/var/lib/libvirt/images/rhel7.1483545901'/>
+                      <backingStore type='file'>
+                        <format type='qcow2'/>
+                        <source file='/var/lib/libvirt/images/rhel7.1483545313'/>
+                        <backingStore type='file'>
+                          <format type='qcow2'/>
+                          <source file='/var/lib/libvirt/images/rhel7.1483536402'/>
+                          <backingStore type='file'>
+                            <format type='qcow2'/>
+                            <source file='/var/lib/libvirt/images/rhel7.qcow2'/>
+                            <backingStore/>
+                          </backingStore>
+                        </backingStore>
+                      </backingStore>
+                    </backingStore>
+                  </backingStore>
+                </backingStore>
+              </backingStore>
+            </backingStore>
+          </backingStore>
+        </backingStore>
+      </backingStore>
       <target dev='vdf' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-inactive.xml b/tests/qemuxml2xmloutdata/disk-mirror-inactive.xml
index cc7aed0873..5c9b72738d 100644
--- a/tests/qemuxml2xmloutdata/disk-mirror-inactive.xml
+++ b/tests/qemuxml2xmloutdata/disk-mirror-inactive.xml
@@ -17,12 +17,14 @@
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw'/>
       <source dev='/dev/HostVG/QEMUGuest1'/>
+      <backingStore/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='cdrom'>
       <driver name='qemu' type='raw'/>
       <source dev='/dev/HostVG/QEMUGuest2'/>
+      <backingStore/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
@@ -30,12 +32,14 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='raw'/>
       <source file='/tmp/data.img'/>
+      <backingStore/>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
     <disk type='file' device='disk'>
       <driver name='qemu' type='raw'/>
       <source file='/tmp/logs.img'/>
+      <backingStore/>
       <target dev='vdb' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
diff --git a/tests/qemuxml2xmloutdata/disk-mirror-old-inactive.xml b/tests/qemuxml2xmloutdata/disk-mirror-old-inactive.xml
index cc7aed0873..5c9b72738d 100644
--- a/tests/qemuxml2xmloutdata/disk-mirror-old-inactive.xml
+++ b/tests/qemuxml2xmloutdata/disk-mirror-old-inactive.xml
@@ -17,12 +17,14 @@
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw'/>
       <source dev='/dev/HostVG/QEMUGuest1'/>
+      <backingStore/>
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <disk type='block' device='cdrom'>
       <driver name='qemu' type='raw'/>
       <source dev='/dev/HostVG/QEMUGuest2'/>
+      <backingStore/>
       <target dev='hdc' bus='ide'/>
       <readonly/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
@@ -30,12 +32,14 @@
     <disk type='file' device='disk'>
       <driver name='qemu' type='raw'/>
       <source file='/tmp/data.img'/>
+      <backingStore/>
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </disk>
     <disk type='file' device='disk'>
       <driver name='qemu' type='raw'/>
       <source file='/tmp/logs.img'/>
+      <backingStore/>
       <target dev='vdb' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
-- 
2.16.2

--
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]

  Powered by Linux