On Fri, Jan 3, 2020 at 11:48 AM Louis Lagendijk <louis(a)fazant.net> wrote:
virt-manager does not enable discards on IDE or virtio disks. I think
it DOES enable discard on SCSI disks. So strictly speaking the above is
true as long as the default emulation layer is not SCSI but it is a
matter of a few clicks to enable it.
"hypervisor default" is what virt-manager reports because it doesn't
actually know what the default is.
When the "disk bus" is set to either VirtIO or SCSI, and discard mode
is "hypervisor default", discard pass down is not enabled.
When VirtIO discard mode is "unmap", both blkdiscard and fstrim work
as I'd expect.
When SCSI discard mode is "unmap", fstrim does nothing, but blkdiscard
works as expected. Pretty weird.
Backing device in these cases is a raw file. For SCSI, it's using the
virtio SCSI controller (which is also not added by default in
virt-manager VMs).
So yeah it's really not obvious how to configure all of this, it's
pretty much poke it with a stick and see what happens.
--
Chris Murphy