Ubuntu 22.04 host suspend/resume breaks LXD container veth interfaces — containers lose external network
Environment
Ubuntu 22.04 LTS host with LXD 5.12 running unprivileged LXC containers attached to an lxdbr0 bridge; host uses NetworkManager to manage physical NICs; host kernel 5.15.0-56; containers use bridged veth interfaces with predictable naming.
Symptoms
After suspending the host (s2idle) and resuming, containers retain their IPs but cannot reach the internet and cannot be reached from other hosts. 'lxc exec <container> -- ping 8.8.8.8' fails; container internal networking (lo) is fine. Restarting the container's network inside the container does not restore connectivity. Restarting the LXD daemon on the host restores network for all containers briefly, but the issue recurs on subsequent suspend/resume cycles.
Observations
On the host after resume, 'ip link' shows veth interfaces for containers present but the peer end in the container namespace appears down or the veth pairs show mismatched indexes. 'brctl show' / 'ip -d link show lxdbr0' reports the bridge is up and has ports, but traffic counters for container veth peers do not increment. dmesg contains a handful of kernel messages indicating 'veth: release' around suspend and 'device removed' during resume for the bridge. NetworkManager logs show the physical NIC reinitialised on resume and re-applied firewall/iptables rules.
Already attempted
Manually cycled container interface via 'ip link set dev eth0 down/up' inside container (no change). Restarted LXD with 'systemctl restart lxd' — network restored until next suspend. Disabled NetworkManager sleep hooks; tested both with and without NetworkManager managing the physical NIC. Updated LXD to latest stable snap; issue persists. Rebooting host fully clears the problem until next suspend.
Question
What is the most reliable and safe way to diagnose why LXD-created veth pairs become functionally detached after host resume, and how can containers' network be restored automatically without rebooting the host?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Virtualization33% match
Docker containers lose DNS resolution after laptop resume on Ubuntu 22.04 due to systemd-resolved stub resolver change
Open0 answers - Virtualization26% match
KVM guests lose all network after host NIC firmware update under sustained I/O — MTU resets and guests show 1500-only traffic
Open0 answers - Windows24% match
Hyper‑V external virtual switch bound to Wi‑Fi stops forwarding traffic after Windows 11 host resumes from sleep
Open0 answers - Linux23% match
systemd-resolved ignores per-connection DNS split-horizon rules after NetworkManager upgrade on Ubuntu 22.04
Open0 answers - Virtualization22% match
KVM guest interface MTU drops to 1500 and large TCP transfers stall after enabling 802.1Q VLAN tagging on host bridge
Open0 answers