In general make sure to test trim so it works, there are two methods.
On the fly trim, or periodic. I prefer the first one.
Periodic would mean u run sdelete on windows or fstrim on linux regulary.
On the fly trim is only supported by modern os, not on windows xp.
On the fly works with virtio scsi without any modification with win8+, in case of linux you have to enable discard within the guest. It also differs depending on the used file system in linux, for zfs u have to enable autotrim, for others add "discard" to /etc/fstab options.
To test generate a file with random bytes of size 1-2gb, or download a linux iso of your favorite distro. Check used disk space on hypervisor, delete the file, on the fly should free the space within 30 seconds. For periodic let sdelete or fstrim run, this will take much longer, check after it run if the disk space got freed on the hypervisor. If it does not work for you, troubleshoot disk bus and guest options.
For lxc you would need to enable trim on the hypervisor, depends on the filesystem used again.. But its not really needed in that case for thin provisioning, except you want to forward trim to your hardware backed storage, which only is needed for ssd's. Most people will probably let it disabled, there is only a small performance benefit with it. For encrypted storage do not enable discard it will reduce the security.