Re:_HEADS_UP:_15.0-CURRENT,_change_to_bridge(4 )_might_break_some_network_configurations_with_“Invalid argument”

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Wed, 21 May 2025 16:12:08 UTC
On 21/05/2025 18:01, void wrote:
> This bhyve host was set up following instructions from the bhyve section of the 
> handbook. I've just checked and no mention is made of the
> new requirement in section 24.7.1 of the handbook at
> https://freebsd.org/handbook
> 
> So, if a lot of people run bhyve guests as described
> then more people are going to be affected than one might initially
> presume.

Just in case, here is the full Handbook link:
https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-bhyve-prep

I am quite sure that a lot of hosts with VMs are configured that way.
Mine are.
And I saw on developers@ other people reporting the same kind of setup.

I must admit that in my rational mind I understand that a bridge is a bridge, 
but I always felt that a bridge combining several physical interfaces (and thus 
physical LANs) and/or maybe some VLAN interfaces is different from a bridge that 
combines a single physical or VLAN interface with several virtual interfaces 
(like tap or epair) that are connected to VMs.

I always knew to assign an IP address to the first kind of a bridge, never to 
its members.

But in the second case, it felt that the physical interface is the primary 
interface.  It's *the* network interface.  It must be configured fully.  And the 
bridge is "ephemeral".  Maybe I won't start any VMs and won't configure the 
bridge at all.
Why always have that bridge?
Or why change the main networking configuration when I decide to create that "VM 
bridge"?

And this view is reflected in Handbook and also in some external tools for VM 
management.
Take for instance vm-bhyve which seems to be a pretty popular "front-end" to bhyve.
Its quick start has these steps which are equivalent to what Handbook has:
7. vm switch create public
8. vm switch add public em0

Seeing both sides of the things I am not sure what to propose here.

But I certainly do not enjoy the thought that I need to change a host's network 
configuration in case I just want to run a VM and to bridge it to the LAN.
Or I'd have to pre-configure a bridge (with a single member, initially) on every 
host where I might want to configure a bridged VM later.

vm-bhyve links:
- https://github.com/freebsd/vm-bhyve
- https://github.com/churchers/vm-bhyve/wiki/Virtual-Switches
-- 
Andriy Gapon