I tried to test is on a sparse VM here.
UPDATE:
So I more carefully read that link you provided - enable SCSI, then virtio-scsi on another libvirt tab ... and I'm seeing sda device inside the VM. The lsblk is showing expected storage too. fstrim -a worked fine. No errors. Checked the logs after running fstrim and don't see any related issues in there. Just some QXL stuff, but since this isn't a desktop, don't think it matters.
In short, not seeing the issue here with fstrim or virtio-scsi. Both are working. Could it be something else?
Ideas?
Older post:
Code:
$ sudo fstrim /
fstrim: /: the discard operation is not supported
Looked at all 3 of my VM hosts. 2x 16.04 and 1x 14.04. Neither of the 16.04 systems support virtio-scsi and the 14.04 system supports the passthru and block versions, but not the non-block version.
Code:
$ kvm -device ? 2>&1|grep virtio-scsi
name "virtio-scsi-device", bus virtio-bus
name "virtio-scsi-pci", bus PCI
Bookmarks