Clarify TRIM/Discard support for Windows guests in Proxmox?

victorhooi

Member
Apr 3, 2018
217
15
23
33
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
 

H4R0

Active Member
Apr 5, 2020
266
38
28
28
Works out of the box with windows but only with win8/2016+, you should use virtio scsi disk driver, also check ssd emulation.
 

LnxBil

Famous Member
Feb 21, 2015
5,435
588
133
Germany
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 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 your own in 60 seconds.

Buy now!