How to share files with FreeBSD guest in virt-manager

I am running FreeBSD 14 (FreeBSD-14.0-RELEASE-amd64-zfs.qcow2) as a guest OS in virt-manager using a QEMU/KVM user session. The host OS is Debian 12. How do I transfer or share files between the Debian host and the FreeBSD guest?

In the virt-manager settings for the FreeBSD VM, I can add a "filesystem passthrough", but how do I actually mount the shared folder in the FreeBSD VM? If not mistaken, FreeBSD does not have support for "virtio-9p". FreeBSD doesn't have spice-vdagent either.

virt-manager-filesystem-passthrough.png
 
There are plenty of ways you can do this. For example NFS or SSH.

Through usermode networking you can commonly ssh to the host from guest(s).

But you can also manage guest(s) from the host :- this is managed administration. Here's how:

In the guest's network device select Bridged Device, and set the virtual bridge interface (default setting is usermode networking that is NAT). Virt-manager creates a virtual bridge interface virbr0 by default. You have have to activate it. Then you connect to guest(s) via the bridge through the host. You can activate the bridged interface by making sure you have the following setting enabled in /etc/qemu/bridge.conf:

Code:
allow virbr0

Once you have the bridged interface ready you can use any protocol of your choice.
 
Back
Top