For what it’s worth I just did this myself a few weeks ago.
I did a short write up on the process - Tutorial: NC VM Data Directory NFS Integration
I’m using Hansson’s vm as a template/starting point. Rather than doing it all from scratch I chose this because it has a number of system optimizations in it. Also, I was previously running an older version of this vm for a number of years with good results.
The nfs share is defined as follows on truenas 12.
dataset definition

