bhyve, zvol, zfs, and importing zpool from host

I’ve been having problem with importing zpool of a vm which was using a zvol as its disk image.

I don’t know the exact detail but the only way I can import it so far is by dd-ing the image to a file and then attaching it as md device as such:

# mdconfig -a -S 512 -f /mnt/vm/somevm/disk0.img
md0

And then the pool can be normally imported from the md0 device.

Of course, had the vm been created as image file on zfs filesystem, the dd step can be skipped and just md the file right away.

Conclusion?

Just use plain image file for vm disk. Either that or use ufs for the vm filesystem instead (ew).

Other benefit of using image file includes less noisy gpart output.