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>
25 lines
642 B
XML
25 lines
642 B
XML
<volume type='block'>
|
|
<name>Swap</name>
|
|
<key>r4xkCv-MQhr-WKIT-R66x-Epn2-e8hG-1Z5gY0</key>
|
|
<capacity unit='bytes'>2080374784</capacity>
|
|
<allocation unit='bytes'>2080374784</allocation>
|
|
<target>
|
|
<path>/dev/HostVG/Swap</path>
|
|
<permissions>
|
|
<mode>0660</mode>
|
|
<owner>0</owner>
|
|
<group>6</group>
|
|
<label>system_u:object_r:fixed_disk_device_t:s0</label>
|
|
</permissions>
|
|
</target>
|
|
<backingStore>
|
|
<path>/dev/HostVG/snapshot</path>
|
|
<permissions>
|
|
<mode>0744</mode>
|
|
<owner>1</owner>
|
|
<group>1</group>
|
|
<label>virt_image_t</label>
|
|
</permissions>
|
|
</backingStore>
|
|
</volume>
|