mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Allow cloning volumes with no capacity specified
In virStorageVolCreateXML, add VIR_VOL_XML_PARSE_NO_CAPACITY to the call parsing the XML of the new volume to make the capacity optional. If the capacity is omitted, use the capacity of the old volume. We already do that for values that are less than the original volume capacity.
This commit is contained in:
21
tests/storagevolxml2xmlout/vol-qcow2-nocapacity.xml
Normal file
21
tests/storagevolxml2xmlout/vol-qcow2-nocapacity.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<volume type='file'>
|
||||
<name>OtherDemo.img</name>
|
||||
<key>/var/lib/libvirt/images/OtherDemo.img</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>0</capacity>
|
||||
<allocation unit='bytes'>0</allocation>
|
||||
<target>
|
||||
<path>/var/lib/libvirt/images/OtherDemo.img</path>
|
||||
<format type='qcow2'/>
|
||||
<permissions>
|
||||
<mode>0644</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
||||
</permissions>
|
||||
<encryption format='qcow'>
|
||||
<secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
|
||||
</encryption>
|
||||
</target>
|
||||
</volume>
|
||||
Reference in New Issue
Block a user