]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add schema and documentation for 'dataStore' sub-element of disk source
authorNikolai Barybin <nikolai.barybin@virtuozzo.com>
Wed, 20 Nov 2024 15:48:38 +0000 (18:48 +0300)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 Nov 2024 19:28:15 +0000 (20:28 +0100)
Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
docs/formatdomain.rst
src/conf/schemas/domaincommon.rng

index 18b60fe260acd058ec979f9126b64f2f7646649a..937a772ef7f7a415c25e91a8844b977b38a0a74b 100644 (file)
@@ -2727,6 +2727,25 @@ paravirtualized driver is specified via the ``disk`` element.
        <source dev='/dev/vhost-vdpa-0' />
        <target dev='vdg' bus='virtio'/>
      </disk>
+     <disk type='file' device='disk'>
+       <driver name='qemu' type='qcow2'/>
+       <source file='/path/to/datastore.qcow2'>
+         <dataStore type='file'>
+           <format type='raw'/>
+           <source file='/path/to/datastore'/>
+         <dataStore/>
+       </source>
+       <backingStore type='file'>
+         <format type='qcow2'/>
+         <source file='/var/lib/libvirt/images/base-with-data-file.qcow'>
+           <dataStore type='block'>
+             <format type='raw'/>
+             <source dev='/dev/mapper/base2'/>
+           <dataStore/>
+         </source>
+       </backingStore>
+       <target dev='vdh' bus='virtio'/>
+     </disk>
    </devices>
    ...
 
@@ -3097,6 +3116,28 @@ paravirtualized driver is specified via the ``disk`` element.
       attribute.
       :since:`Since 9.8.0`
 
+   ``dataStore``
+      This element describes external data store, which is storage holding the
+      actual data blocks of the given storage image. In such case the disk source
+      image holds only the metadata. This feature is currently supported only
+      by the ``qcow2`` format. :since:`Since 10.10.0`
+
+      The following attribute is supported in ``dataStore``:
+
+      ``type``
+         The ``type`` attribute represents the type of storage used by the data store,
+         see disk type attribute above for more details and possible values.
+
+      Moreover, ``dataStore`` supports the following sub-elements:
+
+      ``format``
+         The ``format`` element contains ``type`` attribute which specifies the
+         internal format of the data store. Only ``raw`` value is supported.
+
+      ``source``
+         This element has the same structure as the ``source`` element in ``disk``.
+         It specifies which file, device, or network location contains the data of
+         the described data store.
 
    For a "file" or "volume" disk type which represents a cdrom or floppy (the
    ``device`` attribute), it is possible to define policy what to do with the
index bfd0044805fdb5c6938a0b1a7bb8c681b63dd758..7415c37b65511de95244e0295881c180966ebba3 100644 (file)
         </element>
       </element>
     </optional>
+    <optional>
+      <element name="dataStore">
+        <interleave>
+          <ref name="diskFormat"/>
+          <ref name="diskSource"/>
+        </interleave>
+      </element>
+    </optional>
+
     <ref name="privateDataStorageSource"/>
   </define>