The following is for the bhyve command (and
not any bhyve management package). As an example, if you want to export "/usr/src" under sharename "src" in the VM, add
-s 8,virtio-9p,src=/usr/src
to the bhyve command line. Add a different pci device & distinct sharename for each separate filesystem you want to export. For example to export "/usr/obj"
readonly under sharename "obj", add
-s 9,virtio-9p,obj=/usr/obj,ro
To mount one of these on a debian host you'd need something like
mount -t 9p -o trans=virtio,version=9p2000.L,rw,cache=mmap src /mnt
I'm not familiar with various mount options for 9p on linux but there is a detailed documentation online. Also, do read the
bhyve(8) carefully and experiment to become familiar with it!
I *think* this should work with 14.3 but I haven't tried. Also note that I haven't looked into bhyve's soruce code to check if there are bug fixes in the 15- branch that are not backported to 14.3 or earlier.