<div dir="ltr">Hmm interesting, so without adding backing_fmt, if i enable the below in /etc/libvirt/qemu.conf, will it work ?<br><br># If allow_disk_format_probing is enabled, libvirt will probe disk<br># images to attempt to identify their format, when not otherwise<br># specified in the XML. This is disabled by default.<br>#<br># WARNING: Enabling probing is a security hole in almost all<br># deployments. It is strongly recommended that users update their<br># guest XML <disk> elements to include  <driver type='XXXX'/><br># elements instead of enabling this option.<br>#<br>#allow_disk_format_probing = 1<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 5:33 PM, Shanzhi Yu <span dir="ltr"><<a href="mailto:shyu@redhat.com" target="_blank">shyu@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div><br></div><div><br></div><hr><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Deepak Shetty" <<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>><br><b>To: </b><a href="mailto:libvir-list@redhat.com" target="_blank">libvir-list@redhat.com</a><br><b>Sent: </b>Wednesday, March 18, 2015 7:19:05 PM<br><b>Subject: </b>[libvirt] Domain XML isn't dumping full backing chain<div><div class="h5"><br><div><br></div><div dir="ltr"><div><div><div><div><span style="font-family:times new roman,serif">Hi,<br></span></div><span style="font-family:times new roman,serif">I am using libvirt version 1.2.9.2 on F21 and i am unable to get the complete backing chain info in the virsh dumpxml output. Details below :<br><div><br></div></span></div><span style="font-family:times new roman,serif"><b>My backing chain per qemu-img :</b><br></span></div><span style="font-family:times new roman,serif"><br>[stack@devstack-f21 test]$ qemu-img info --backing-chain snap4.qcow2 <br>image: snap4.qcow2<br>file format: qcow2<br>virtual size: 1.0G (1073741824 bytes)<br>disk size: 196K<br>cluster_size: 65536<br>backing file: ./snap3.qcow2<br>Format specific information:<br>    compat: 1.1<br>    lazy refcounts: false<br><div><br></div>image: ./snap3.qcow2<br>file format: qcow2<br>virtual size: 1.0G (1073741824 bytes)<br>disk size: 196K<br>cluster_size: 65536<br>backing file: ./snap2.qcow2 (actual path: ././snap2.qcow2)<br>Format specific information:<br>    compat: 1.1<br>    lazy refcounts: false<br><div><br></div>image: ././snap2.qcow2<br>file format: qcow2<br>virtual size: 1.0G (1073741824 bytes)<br>disk size: 196K<br>cluster_size: 65536<br>backing file: ./snap1.qcow2 (actual path: ./././snap1.qcow2)<br>Format specific information:<br>    compat: 1.1<br>    lazy refcounts: false<br><div><br></div>image: ./././snap1.qcow2<br>file format: qcow2<br>virtual size: 1.0G (1073741824 bytes)<br>disk size: 196K<br>cluster_size: 65536<br>backing file: ./base.qcow2 (actual path: ././././base.qcow2)<br>Format specific information:<br>    compat: 1.1<br>    lazy refcounts: false<br><div><br></div>image: ././././base.qcow2<br>file format: qcow2<br>virtual size: 1.0G (1073741824 bytes)<br>disk size: 196K<br>cluster_size: 65536<br>Format specific information:<br>    compat: 1.1<br>    lazy refcounts: false<br></span></div></div></div></div></blockquote><div>If you want prepare the backing chain yourself, you should  add "-o backing_fmt=$farmat" options, <br></div><div>like "qemu-img create -f qcow2 base.s1 -b base.qcow2 -o backing_fmt=qcow2" <br></div><span class=""><div><br></div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><span style="font-family:times new roman,serif">I created 4 snapshots using commands (similar to the below, just dumping the last one here ):<br><div><br></div></span><div><span style="font-family:times new roman,serif">[stack@devstack-f21 test]$ virsh snapshot-create-as test-domain on-test-snap4  --disk-only --reuse-external --diskspec hda,snapshot=external,file=/home/stack/test/snap4.qcow2 <br>Domain snapshot on-test-snap4 created<br><div><br></div>[stack@devstack-f21 test]$ virsh domblklist test-domain<br>Target     Source<br>------------------------------------------------<br>hda        /home/stack/test/snap4.qcow2<br><div><br></div><br><div><br></div>virsh dumpxml test-domain|more<br>....<br><div><br></div>    <disk type='file' device='disk'><br>      <driver name='qemu' type='qcow2' cache='none'/><br>      <source file='/home/stack/test/snap4.qcow2'/><br>      <backingStore type='file' index='1'><br>        <format type='raw'/></span></div></div></blockquote></span><div>If you don't add "-o backing_fmt=qcow2", it will treat backing file format as raw format.<br></div><div>Since a raw format file doesn't have a backing file, so you only see snap4.qcow2 and <br></div><div>snap3.qcow2<br></div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><span class=""><div dir="ltr"><div><span style="font-family:times new roman,serif"><br>        <source file='/home/stack/test/./snap3.qcow2'/><br>        <backingStore/><br>      </backingStore><br>      <target dev='hda' bus='ide'/><br>      <alias name='ide0-0-0'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='0'/><br>    </disk><br><div><br></div><br>.....<br><div><br></div></span></div><div><span style="font-family:times new roman,serif">I think thats happening beccause the backingStore format is coming as 'raw'<br></span></div><div><span style="font-family:times new roman,serif">What am i missing ?<br><div><br></div></span></div><div><span style="font-family:times new roman,serif">thanx,<br></span></div><div><span style="font-family:times new roman,serif">deepak<br><div><br></div></span></div></div><br></span><span class="HOEnZb"><font color="#888888">--<br>libvir-list mailing list<br><a href="mailto:libvir-list@redhat.com" target="_blank">libvir-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/libvir-list" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a></font></span></blockquote><span class="HOEnZb"><font color="#888888"><div><br><br></div><div><br></div><div>-- <br></div><div><span name="x"></span>Regards<br>shyu<span name="x"></span><br></div></font></span></div></div></blockquote></div><br></div>