Once upon a time, Fabian Deutsch <fdeutsch(a)redhat.com> said:
I'm not sure which qemu disk drivers/busses support this, but at
least virtio does so.
I'm using it for development.
Using CentOS 7, I think qemu-kvm only supports discard on virtio-scsi
drives using the raw format. Discard on qcow2 images is supported for
newer versions of qemu-kvm.
oVirt uses virtio by default; you can switch to virtio-scsi. However,
if you use thin-provisioned disks, oVirt uses qcow2 format, so discard
is not supported with CentOS 7's version of qemu-kvm.
--
Chris Adams <cma(a)cmadams.net>