I just tried installing NetBSD 11.0 with Root on ZFS using the guide on
the wiki[1]. It worked like a charm. I diverted a little bit from the
guide, which didn't seem a problem, specifically I used a different disk
for ZFS.
A problem I ran into though, was that the zfsroot.rc script has not been
updated for a while, and it requires hardcoded values for the ZFS pool
and the rootfs (rpool/ROOT). I made some changes to this script, so
that it will probe for ZFS pools and check if they have a rootfs
property set. I kept it backwards compatible with the current script,
by always attempting if a ROOT filesystem is available.
Unfortunately, I was unable to build the ramdisk myself. The guide [1]
speaks of a program called nbmake-amd64, which I wasn't able to find any
reference to online. When trying my best with normal make it stopped
right away on missing ../../compat/exec.mk, I didn't pursue a fix here.
Instead, I downloaded the current ramdisk, mounted it using vndconfig
and replaced the etc/rc script in it and *renamed* altroot to zfsroot.
After that, I was able to reboot into my differently-named ZFS pool,
setting the filesystem marked as bootfs as the root filesystem.
I've attached the updated rc script, as well as a proposed patch, even
though I was not able to test the patch due to not being able to build
the ramdisk.
[1] https://wiki.netbsd.org/root_on_zfs/