mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
6423e30828
If there are no source extents the volume XML has an empty <source> element. Remove it if there's nothing in it by using virXMLFormatElement. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
26 lines
653 B
XML
26 lines
653 B
XML
<volume type='file'>
|
|
<name>sparse.img</name>
|
|
<key>/var/lib/libvirt/images/sparse.img</key>
|
|
<capacity unit='bytes'>10000000000</capacity>
|
|
<allocation unit='bytes'>0</allocation>
|
|
<target>
|
|
<path>/var/lib/libvirt/images/sparse.img</path>
|
|
<format type='raw'/>
|
|
<permissions>
|
|
<mode>00</mode>
|
|
<owner>744</owner>
|
|
<group>0</group>
|
|
</permissions>
|
|
</target>
|
|
<backingStore>
|
|
<path>/var/lib/virt/images/master.img</path>
|
|
<format type='vmdk'/>
|
|
<permissions>
|
|
<mode>0744</mode>
|
|
<owner>1</owner>
|
|
<group>1</group>
|
|
<label>virt_image_t</label>
|
|
</permissions>
|
|
</backingStore>
|
|
</volume>
|