Clarify TRIM/Discard support for Windows guests in Proxmox?

victorhooi

Active Member
Apr 3, 2018
250
20
38
37
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!