TRIM support requires intimate knowledge of the underlying hardware. Since Virtual machines (VM Guests) by definition run on virtual hardware, they are not aware of the details of the hard drive or SSD on which they reside.
So, if the VM Host operating system understands TRIM, that should be sufficient for all VM Guests running on top of it.
Some VM Hosts can "pass through" a physical drive and mount it directly to the operating system on a VM Guest. Depending on the exact implementation, it is theoretically possible that the Guest could then support the TRIM feature of an SSD. As with most things, your mileage may vary, and if it's critical for your environment you should test it thoroughly before you commit.
1
I believe VMware removed this marketing claim from future versions because it was crippled as they didn't support TRIM. See here and here
– Tom Hale – 2016-11-15T11:13:39.747