mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
1b5c8d4cbc
I got annoyed at having to use both 'virsh vol-list $pool --details' AND 'virsh vol-dumpxml $vol $pool' to learn if I had populated the volume correctly. Since two-thirds of the data present in virStorageVolGetInfo() already appears in virStorageVolGetXMLDesc(), this just adds the remaining piece of information, as: <volume type='...'> ... </volume> * docs/formatstorage.html.in: Document new <volume type=...>. * docs/schemas/storagevol.rng (vol): Add it to RelaxNG. * src/conf/storage_conf.h (virStorageVolTypeToString): Declare. * src/conf/storage_conf.c (virStorageVolTargetDefFormat): Output the metatype. (virStorageVolDefParseXML): Parse it, for unit tests. * tests/storagevolxml2xmlout/vol-*.xml: Update tests to match. Signed-off-by: Eric Blake <eblake@redhat.com>
28 lines
676 B
XML
28 lines
676 B
XML
<volume type='file'>
|
|
<name>sparse.img</name>
|
|
<key>/var/lib/libvirt/images/sparse.img</key>
|
|
<source>
|
|
</source>
|
|
<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>
|