mullane.info

Bridging the only network card over SSH

Undated · common

Each hypervisor in the house has one network card, and for VMs to sit on the network directly that card has to become part of a bridge. Doing that over SSH, on the card you’re connected through, is a reliable way to lock yourself out. The first time was on 2026-10-25, and the method that worked has been a script ever since.

The order is what matters. First, schedule the rollback: a systemd timer (systemd-run --on-active=180) that restores the old configuration in three minutes unless cancelled. Then apply the change inside a detached unit, so it doesn’t die with the SSH session it’s about to break. Reconnect. If that works, cancel the rollback; if it doesn’t, wait three minutes. The other detail is the bridge’s MAC address: by default a new bridge gets its own, which the DHCP reservation doesn’t know, so the host comes back on a different address or none. Pin the bridge’s MAC to the card’s.

A related one from a couple of days later: rebooting a hypervisor hard-killed its VMs. Arch ships libvirt-guests disabled, and its default action, if you do enable it, is to suspend the guests, not shut them down. Enabling it with ON_SHUTDOWN=shutdown fixed it, and the VMs now shut down cleanly at the weekly reboot.

Neither is new knowledge, exactly, but both were new to this house.