Any Linux VM can use Rosetta[1] you just need to enable it when booting the vm. This creates a shared directory in the vm that you need to mount and then register Rosetta with binfmt_misc (same way Docker uses qemu).
[1] https://developer.apple.com/documentation/virtualization/run...
FTFY
You don't need the mount, it just exposes the Linux binary stored on macOS, which you can copy over. The binary does check for it being run under virt.fw, although some folks managed to hack that away (IIRC running it on AWS whatever)
If you use NixOS you can simply enable https://search.nixos.org/options?channel=23.11&show=virtuali...
You must run arm64 MacOS or Linux VMs and those VMs can run x86_64 binaries via Rosetta. Apple documented this.
Running an x86_64 virtual machine on MacOS requires software emulation, which is why it is so slow. Docker sets it up correctly so that the Linux VM it uses is arm64 but the binaries in the containers are x86_64, so that Rosetta can be used on those binaries.