TRIM Support on KVM Virtual Machines
May 31, 2016
Messing with KVM as a replacement for my Microserver setup at home. With KVM, you can define a thin-provisioned VM image file (a qcow2 file), which is a sparse file on the filesystem. You can then configure the guest O/S so that TRIM support works, and it can then unmap unused blocks by the guest FS and have those blocks get unmapped the whole way down the stack (released from the sparse file, and ultimately trimmed from the underlying SSD if there is one).