Saturday, December 04, 2021

[umgnxrbn] Xen networking on Debian bullseye

mostly following Debian instructions for Xen.

standard stuff added to /etc/network/interfaces:

iface enp58s0f1 inet manual

auto xenbr0
iface xenbr0 inet dhcp
     bridge_ports enp58s0f1

"ip a" does show xenbr0.

(tangent: we would prefer to do "allow-hotplug" instead of "auto" to prevent boot from being slow if there is no ethernet cable plugged in, but allow-hotplug xenbr0 does not work (network does not come up; unsurprisingly udev cannot detect that there's a network cable plugged into "xenbr0").  with "auto", boot is slower, but not the full 5 minutes of delay as the boot message seems to suggest: boot continues after about 1 minute of delay.)

somewhat nonstandard on this system is that NetworkManager is running: NetworkManager manages the wifi interface, and ifupdown (aka /etc/network/interfaces) manages ethernet.  NetworkManager is supposed to avoid trying to manage interfaces in /etc/network/interfaces, as configured in the default /etc/NetworkManager/NetworkManager.conf:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

however, when bringing up a paraVM created with xen-create-image, we see this in journalctl:

NetworkManager[68473]: <info> [1636093454.5580] settings: (vif7.0): created default wired connection 'Wired connection 1'

and then later more references to vif and Wired connection 1.  for some reason, NetworkManager is, I think, trying to bridge between "Wired connection 1" (which did not even exist!) and the vif for the VM.  the solution is to prevent NetworkManager from touching vif devices:

/etc/NetworkManager/conf.d/no-vif.conf :

[keyfile]
unmanaged-devices=interface-name:vif*

future work: let xenbr0 be a bridge to whichever network connection is active, ethernet or wifi.

No comments :