mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +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>
16 lines
406 B
XML
16 lines
406 B
XML
<volume type='file'>
|
|
<name><sparse>.img</name>
|
|
<capacity unit='bytes'>1099511627776</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>
|
|
<label>virt_image_t</label>
|
|
</permissions>
|
|
</target>
|
|
</volume>
|