From 478c32fe513297e69c631cd65b368deb3a896dc7 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Sun, 17 May 2026 17:38:20 +1000 Subject: [PATCH] fix(build): keep failover modules in initramfs strip virtio_net depends on net_failover/failover for live-migration support. Stripping them left virtio_net with unresolved symbols (net_failover_create/destroy), so the module failed to load and the guest came up with only lo. init.sh then skipped every NIC ("no interface found for MAC ..."), leaving lb-agent with no network path to AWSGW and the LB stuck in provisioning. Add *failover*.ko* to the keep-list. Image size unchanged at 42 MiB (under the 50 MiB Phase 2 gate). ELBv2 e2e now reaches active and 2/2 targets healthy for both ALB and NLB internal LBs. --- scripts/build-microvm-image.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build-microvm-image.sh b/scripts/build-microvm-image.sh index dea1b5e8c..ef48c602e 100755 --- a/scripts/build-microvm-image.sh +++ b/scripts/build-microvm-image.sh @@ -160,8 +160,9 @@ fi # --- Strip kernel modules (Phase 2 keep-list approach) --- # Only modules needed by a virtio-mmio microvm guest are kept: -# virtio*.ko* — virtio bus, net, blk, rng, console, and helpers -# *fw_cfg*.ko* — QEMU fw_cfg sysfs driver (delivers boot blobs) +# virtio*.ko* — virtio bus, net, blk, rng, console, and helpers +# *fw_cfg*.ko* — QEMU fw_cfg sysfs driver (delivers boot blobs) +# *failover*.ko* — net_failover + failover (virtio_net deps for live migration) # All other loadable modules are removed. Drivers compiled into the kernel # (CONFIG_VIRTIO_MMIO=y etc.) are unaffected — they live in vmlinuz, not here. echo "[build-microvm-image] stripping kernel modules to virtio+fw_cfg only..." @@ -174,6 +175,7 @@ for kver_dir in "$CHROOT_DIR/lib/modules"/*/; do tmp_keep=$(mktemp -d) find "$kernel_dir" -name "virtio*.ko.gz" -o -name "virtio*.ko" \ -o -name "*fw_cfg*.ko.gz" -o -name "*fw_cfg*.ko" \ + -o -name "*failover*.ko.gz" -o -name "*failover*.ko" \ 2>/dev/null | while read -r mod; do rel="${mod#"$kernel_dir/"}" dest_dir="$tmp_keep/$(dirname "$rel")"