bhyve How do you share files into bhyve VMs?

I use plain bhyve and have something like the following args to bhyve command line:
-s 8,virtio-9p,src=/usr/src \
-s 9,virtio-9p,obj=/usr/obj \
Then in the freebsd guest /etc/fstab has entries like this:
src /usr/src p9fs rw 0 0
obj /usr/obj p9fs rw 0 0
As for performance, see this -hackers post: https://lists.freebsd.org/archives/freebsd-hackers/2026-May/006363.html
The uncached numbers for nfs are *worse* than I remembered!
But warning: p9fs is used much less and tested much less so there may still be bugs.

Sharing is still much worse so I usually just copy files to the VM's filesystem.
I use nvme as virtual disk type, for example: " -s 5,nvme,disk.img \"
 
I use plain bhyve and have something like the following args to bhyve command line:

Then in the freebsd guest /etc/fstab has entries like this:

As for performance, see this -hackers post: https://lists.freebsd.org/archives/freebsd-hackers/2026-May/006363.html
The uncached numbers for nfs are *worse* than I remembered!
But warning: p9fs is used much less and tested much less so there may still be bugs.

Sharing is still much worse so I usually just copy files to the VM's filesystem.
I use nvme as virtual disk type, for example: " -s 5,nvme,disk.img \"
Thank you, most appreciated!
 
Back
Top