From 5cf5cba7ac0e5729df1393eb81a7bbbd463a5de9 Mon Sep 17 00:00:00 2001 From: Josh Siviour Date: Mon, 8 Jun 2026 08:44:57 +1000 Subject: [PATCH] fix(microvm): load virtio_net dependency chain explicitly in init (#311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LB system microVM stripped its module tree to virtio + fw_cfg + failover, but init.sh only loaded qemu_fw_cfg and virtio_net. virtio_net depends on net_failover -> failover; modprobe resolves that chain via modules.dep, and load_mod()'s insmod-by-path fallback loads a single .ko with no dependency resolution. When the image is built on a kmod-less host (depmod skipped, no modules.dep) the chain can't be resolved either way, so virtio_net fails to load, no NIC appears ('no interface found for MAC'), the lb-agent has no network, heartbeats never reach AWSGW and every LB hangs in provisioning until the 5m e2e timeout. Baremetal runners ship kmod so modules.dep is generated and the chain resolves — which is why the LB suite passed there but failed on normal CI. Load failover -> net_failover -> virtio_net explicitly bottom-up so the NIC comes up regardless of whether modules.dep exists. --- build/microvm/init.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/microvm/init.sh b/build/microvm/init.sh index 309e2d8c2..0cf893ad7 100755 --- a/build/microvm/init.sh +++ b/build/microvm/init.sh @@ -23,6 +23,14 @@ load_mod() { return 1 } load_mod qemu_fw_cfg || load_mod fw_cfg_sysfs || true +# virtio_net depends on net_failover, which depends on failover. The load_mod +# insmod fallback loads a single .ko with no dependency resolution, and +# modules.dep is absent when the image is built on a kmod-less host (depmod +# skipped), so modprobe can't resolve the chain either. Load it explicitly +# bottom-up so the NIC comes up regardless of how the image was built — +# without this the agent has no network and the LB hangs in provisioning. +load_mod failover || true +load_mod net_failover || true load_mod virtio_net || true NETCFG=/sys/firmware/qemu_fw_cfg/by_name/opt/spinifex/netcfg/raw