Clarify TRIM/Discard support for Windows guests in Proxmox?

victorhooi

Well-Known Member
Apr 3, 2018
256
20
58
39
Hi,

I'm a bit confused about what the current TRIM/discard support

My understanding is that enabling the "Discard" checkbox in Proxmox will enable the VM to call "TRIM", and return back unused blocks - which on storage like ZFS (which supports thin-provisioning), can reduce the amount of actually used disk space. Is that correct?

Most of the Proxmox documentation seems to refer to this "Discard" feature as only being supported on Linux - e.g.:

https://pve.proxmox.com/pve-docs/chapter-qm.html#qm_hard_disk

> Note that Discard on VirtIO Block drives is only supported on guests using Linux Kernel 5.0 or higher.

Does the Discard flag have any effect on Windows VMs?

Which versions of Windows? And do you need to do anything to activate it?

Regards,
Victor
 
Works out of the box with windows but only with win8/2016+, you should use virtio scsi disk driver, also check ssd emulation.
 
My understanding is that enabling the "Discard" checkbox in Proxmox will enable the VM to call "TRIM", and return back unused blocks - which on storage like ZFS (which supports thin-provisioning), can reduce the amount of actually used disk space. Is that correct?

Yes.