zfs ubuntu root,how to boot?

I followed this guide and it worked for me in a KVM with 3 disks in a raidz1 configuration:

https://github.com/zfsonlinux/zfs/wiki/Ubuntu-16.04-Root-on-ZFS

There were two caveats:

  1. I had to use non-virtio disks, or else grub (yes, grub), at boot time, would see only one disk instead of 3. Since I was using raidz1, that was not enough to boot.

  2. The other one is that if using disk/by-id devices, you may have to export this variable for grub until bug #1527727 is fixed: export ZPOOL_VDEV_NAME_PATH=YES