Reuse the XML files in storagevolxml2xmlin.
(This requires changing a few backing files to /dev/null,
since virStorageBackendCreateQemuImgCmd checks for its
presence)
+++ /dev/null
-<volume>
- <name>sparse.img</name>
- <source/>
- <capacity unit="TiB">1</capacity>
- <allocation unit="bytes">0</allocation>
- <target>
- <path>/var/lib/libvirt/images/sparse.img</path>
- <permissions>
- <mode>0</mode>
- <owner>0744</owner>
- <group>0</group>
- <label>virt_image_t</label>
- </permissions>
- <timestamps>
- <atime>1341933637.273190990</atime>
- <mtime>1341930622.047245868</mtime>
- <ctime>1341930622.047245868</ctime>
- </timestamps>
- </target>
-</volume>
+++ /dev/null
-<volume>
- <name>OtherDemo.img</name>
- <key>/var/lib/libvirt/images/OtherDemo.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</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>
- <compat>0.10</compat>
- <features>
- <lazy_refcounts/>
- </features>
- </target>
- <backingStore>
- <path>/dev/null</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- </backingStore>
-</volume>
+++ /dev/null
-<volume>
- <name>OtherDemo.img</name>
- <key>/var/lib/libvirt/images/OtherDemo.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</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>
- <features/>
- </target>
- <backingStore>
- <path>/dev/null</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- </backingStore>
-</volume>
+++ /dev/null
-<volume>
- <name>OtherDemo.img</name>
- <key>/var/lib/libvirt/images/OtherDemo.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</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>
- <compat>1.1</compat>
- <features>
- <lazy_refcounts/>
- </features>
- </target>
- <backingStore>
- <path>/dev/null</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- </backingStore>
-</volume>
+++ /dev/null
-<volume>
- <name>OtherDemo.img</name>
- <key>/var/lib/libvirt/images/OtherDemo.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</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>
+++ /dev/null
-<volume>
- <name>OtherDemo.img</name>
- <key>/var/lib/libvirt/images/OtherDemo.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</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>
- <backingStore>
- <path>/dev/null</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- </backingStore>
-</volume>
char *cmdline = NULL;
if (info->inputvol &&
- virAsprintf(&inputvolxml, "%s/storagevolxml2argvdata/%s.xml",
+ virAsprintf(&inputvolxml, "%s/storagevolxml2xmlin/%s.xml",
abs_srcdir, info->inputvol) < 0)
goto cleanup;
if (virAsprintf(&poolxml, "%s/storagepoolxml2xmlin/%s.xml",
abs_srcdir, info->pool) < 0 ||
- virAsprintf(&volxml, "%s/storagevolxml2argvdata/%s.xml",
+ virAsprintf(&volxml, "%s/storagevolxml2xmlin/%s.xml",
abs_srcdir, info->vol) < 0) {
goto cleanup;
}
--- /dev/null
+<volume>
+ <name>OtherDemo.img</name>
+ <key>/var/lib/libvirt/images/OtherDemo.img</key>
+ <source>
+ </source>
+ <capacity unit="G">5</capacity>
+ <allocation>294912</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>
+ <compat>0.10</compat>
+ <features>
+ <lazy_refcounts/>
+ </features>
+ </target>
+ <backingStore>
+ <path>/dev/null</path>
+ <format type='raw'/>
+ <permissions>
+ <mode>0644</mode>
+ <owner>0</owner>
+ <group>0</group>
+ <label>unconfined_u:object_r:virt_image_t:s0</label>
+ </permissions>
+ </backingStore>
+</volume>
<features/>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
</features>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
--- /dev/null
+<volume>
+ <name>OtherDemo.img</name>
+ <key>/var/lib/libvirt/images/OtherDemo.img</key>
+ <source>
+ </source>
+ <capacity unit="G">5</capacity>
+ <allocation>294912</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>
</encryption>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
--- /dev/null
+<volume>
+ <name>OtherDemo.img</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity unit='bytes'>5368709120</capacity>
+ <allocation unit='bytes'>294912</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>
+ <compat>0.10</compat>
+ <features>
+ <lazy_refcounts/>
+ </features>
+ </target>
+ <backingStore>
+ <path>/dev/null</path>
+ <format type='raw'/>
+ <permissions>
+ <mode>0644</mode>
+ <owner>0</owner>
+ <group>0</group>
+ <label>unconfined_u:object_r:virt_image_t:s0</label>
+ </permissions>
+ </backingStore>
+</volume>
<features/>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
</features>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
--- /dev/null
+<volume>
+ <name>OtherDemo.img</name>
+ <key>(null)</key>
+ <source>
+ </source>
+ <capacity unit='bytes'>5368709120</capacity>
+ <allocation unit='bytes'>294912</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>
</encryption>
</target>
<backingStore>
- <path>/var/lib/libvirt/images/BaseDemo.img</path>
+ <path>/dev/null</path>
<format type='raw'/>
<permissions>
<mode>0644</mode>
DO_TEST("pool-dir", "vol-qcow2");
DO_TEST("pool-dir", "vol-qcow2-1.1");
DO_TEST("pool-dir", "vol-qcow2-lazy");
+ DO_TEST("pool-dir", "vol-qcow2-0.10-lazy");
+ DO_TEST("pool-dir", "vol-qcow2-nobacking");
DO_TEST("pool-disk", "vol-partition");
DO_TEST("pool-logical", "vol-logical");
DO_TEST("pool-logical", "vol-logical-backing");