For
trim to work, you don't need SSD emulation but you need to enable the
Discard option for the virtual drive (and setup trim/discard inside the VM of course).
"on
VirtIO Block drives is only supported on guests using Linux Kernel 5.0 or higher", according to the documenation. How old is your Ubuntu?