Other How to properly mount a directory via 9p (plan9) in the bhyve of a FreeBSD guest?

Hello.
Host: FreeBSD 14.1
bhyve guest: FreeBSD 14.1

How is it possible to mount a directory via 9p protocol in a freebsd guest?
I'm using the vm-bhyve wrapper.

The official vm-bhyve documentation says:
VM guest conf:
Code:
disk1_type="virtio-9p"
disk1_name="cache=/var/cache/pkg/"
disk1_dev="custom"

Mount in guest freebsd:
Code:
# mount -t 9p -o trans=virtio cache /var/cache/pkg
mount: cache: Invalid fstype: Invalid argument

How to mount the 9p directory correctly?
 
On FreeBSD 15-current it is possible to mount via the module /boot/kernel/virtio_p9fs.ko

Code:
/boot/loader.conf
virtio_p9fs_load=YES

mount -t p9fs cache /mnt

But on FreeBSD 14, this module does not exist.
 
Back
Top