Depending on the used backend storage technology, sure, enable discard on the each virtual disk in PVE and refer to your OS manual how to trim. In Linux, this is fstrim -va. What backend storage technology do you use?We want to know if is there any way we can trim the images running of running vm in proxmox. We want to know when and where we can use virt-sparcify to remove images .
$ fstrim -va
/home: 361,7 MiB (379289600 bytes) trimmed on /dev/sdb1
/boot: 6 MiB (6290432 bytes) trimmed on /dev/sdc1
/: 536 MiB (561991680 bytes) trimmed on /dev/sdc2
Did you stop and start the VM after changing the settings? There has nothing to be orange on the configuration.Even if I completed pre-requisite like SCSI controller as Virtio SCSI and enabled discard on disk ?
Just to clearify: stop and start, reboot will not work.@LnxBil , Yes even after reboot it is not working on some of the vm's .
Which post? It all boils down to having:There is a post which specifies that it if lsblk -D show 0B then it will not work.
So with same setting which I shared with you was working on other vm but not with this one. Additionally what I observed that with new the vm where I am not able to run fstrim , the ssd emulation was disabled. And the vm to which I am able to run fstrim ssm emulation showing as option.Harddisk is virtio not scsi ... that could be the problem.
But that option is not available for some of the vm's. Even though I am not differentiating things in term of configuration part.Maybe you need SSD to check if you're on virtio. Would you be on SCSI, it does not matter.