TRIM with plain QEMU

A reminder for myself:

qemu-img create -f qcow2 dst.img 20G
qemu-system-x86_64 -enable-kvm -m 2048 -serial stdio \
    -device virtio-scsi-pci
    -device scsi-hd,drive=rootdisk
    -drive file=dst.img,if=none,id=rootdisk,discard=on,cache=unsafe

::: {#footer} [ November 26th, 2015 4:55pm ]{#timestamp} [qemu]{.tag} [discard]{.tag} [trim]{.tag} :::