On Wed, Jun 12, 2024 at 08:42:48AM GMT, Laine Stump wrote:
On 6/12/24 6:47 AM, Daniel P. Berrangé wrote:
> On Wed, Jun 12, 2024 at 03:27:24AM -0700, Andrea Bolognani wrote:
> > [...] I'd be extremely surprised to learn that
> > guest network connectivity hasn't worked on FreeBSD all this time.
> > Surely that can't be right! Roman, what am I missing?
>
> This is only the libvirt virtual network backend. I presume BSD hosted
> guests could just use one of the other network backend options.
Based on the wording of Roman's initial message, I wondered if possibly
people had been using the virtual network driver with <forward
mode='open'/>
- this wouldn't ever call any firewall functions, so it should succeed.
It looks like it fails before it can even get to the point where
firewall rules would be created:
# virsh net-start default
error: Failed to start network default
error: Unable to create bridge device: Invalid argument
For reference, here's what the configuration looks like:
# virsh net-dumpxml default
<network>
<name>default</name>
<uuid>2bd47e50-eab7-4988-b7a5-7da41a53f9c8</uuid>
<forward mode='open'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:f2:ce:e4'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
I'm
pretty sure none of the other network types are supported on BSD
(macvtap/direct, or pools of SRIOV VFs used via VFIO device assignment).
Maybe <interface type='bridge'> works?
I'm not even sure why the network driver is enabled on FreeBSD in the
first place. Only the QEMU driver can use it, right? And that's
compiled out by default on FreeBSD, if I'm interpreting the port[1]
correctly. So, at the very least, I would expect the network driver
to only be enabled when the QEMU driver is, i.e. not in the default
binary package.
[1]
https://github.com/freebsd/freebsd-ports/blob/main/devel/libvirt/Makefile
--
Andrea Bolognani / Red Hat / Virtualization