libvirt/tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.xml
Peter Krempa 24db3d9993 tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
The test cases would correspond to the following -drive command lines:

file-backing_basic-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

file-backing_basic-unmap-detect.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap,detect-zeroes=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

file-backing_basic-unmap-ignore.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=ignore,detect-zeroes=on
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

file-backing_basic-unmap.xml:
-drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,discard=unmap
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-05-07 16:05:31 +02:00

48 lines
1.4 KiB
XML

<disk type='file' device='disk'>
<driver name='qemu' type='qcow' discard='unmap' detect_zeroes='unmap'/>
<source file='/var/lib/libvirt/images/a'>
<privateData>
<nodenames>
<nodename type='storage' name='node-a-s'/>
<nodename type='format' name='node-a-f'/>
</nodenames>
</privateData>
</source>
<backingStore type='file' index='1'>
<format type='qed'/>
<source file='/var/lib/libvirt/images/b'>
<privateData>
<nodenames>
<nodename type='storage' name='node-b-s'/>
<nodename type='format' name='node-b-f'/>
</nodenames>
</privateData>
</source>
<backingStore type='network' index='2'>
<format type='vmdk'/>
<source protocol='gluster' name='images/c'>
<host name='test.org'/>
<privateData>
<nodenames>
<nodename type='storage' name='node-c-s'/>
<nodename type='format' name='node-c-f'/>
</nodenames>
</privateData>
</source>
<backingStore type='file' index='3'>
<format type='raw'/>
<source file='/var/lib/libvirt/images/d'>
<privateData>
<nodenames>
<nodename type='storage' name='node-d-s'/>
<nodename type='format' name='node-d-f'/>
</nodenames>
</privateData>
</source>
<backingStore/>
</backingStore>
</backingStore>
</backingStore>
<target dev='vda'/>
</disk>