fix(cidata): resolve AlmaLinux 10 boot failures - #5372
Conversation
Fixes lima-vm#5368 - Guard mDNS script execution by checking systemd-resolved.service unit existence using systemctl cat. - Dynamically detect missing Netfilter kernel modules on DNF distros, append kernel-modules-extra to extrapkgs, and re-execute 00-modprobe.sh right after installation. Signed-off-by: Soumya-codr <soumya.sagar.codr@gmail.com>
Did you test Also please test that it doesn't affect other DNF-based templates |
|
@Soumya-codr Have you tried adding Almalinux to the CI matrix in .github/workflows/test.yml too? |
wait let me see |
|
@whoschek very sorry man i havent tested that let me do that once , apologies from my end 😭 |
|
@Soumya-codr No worries. I thank you for picking up the issue and running with it :-) |
Investigation Update:
|
| Version | |
|---|---|
| Running kernel | 6.12.0-211.7.3.el10_2 |
kernel-modules-extra installed |
6.12.0-211.38.1.el10_2 |
The module gets placed in /lib/modules/6.12.0-211.38.1.el10_2/ which is useless for the running kernel (6.12.0-211.7.3).
Fix: Use kernel-modules-extra-$(uname -r) to install for the exact running kernel version:
extrapkgs="${extrapkgs} kernel-modules-extra-$(uname -r)"Problem 2: Module needs to be loaded after install
Even after installing the correct kernel-modules-extra, the xt_comment module needs to be explicitly loaded via modprobe xt_comment before BuildKit starts. The current boot sequence runs 00-modprobe.sh before 30-install-packages.sh, so modules installed later are never loaded.
Affected Distros
- AlmaLinux 10 (confirmed)
- Likely: Rocky Linux 10, CentOS Stream 10, Oracle Linux 10 (all RHEL 10-based)
- NOT affected: Fedora (has
xt_commentin base kernel modules)
Possible Fixes
- In
30-install-packages.sh: Changekernel-modules-extra‚Üíkernel-modules-extra-$(uname -r)and addmodprobe xt_commentafter install - In
40-install-containerd.sh: Load required modules before starting BuildKit - Alternative: Make BuildKit failure non-fatal during boot (containerd itself works fine)
Happy to submit a PR for whichever approach you prefer! Let me know.
Environment
- Host: macOS (Apple Silicon, Virtualization.framework / VZ)
- Guest: AlmaLinux 10 GenericCloud (
6.12.0-211.7.3.el10_2.aarch64) - Lima: built from
mainbranch
|
Am i missing out something ?? 👀 |
My question was whether you tested |

What This PR Changes
This PR resolves AlmaLinux 10 (and similar RHEL/EL10 distros) CI boot failures by addressing two root causes:
mDNS Script Failure (
06-enable-mdns-on-systemd.sh): AlmaLinux 10 ships withresolvectlbut does not includesystemd-resolved.service. Added asystemctl cat systemd-resolved.service >/dev/null 2>&1 || exit 0guard so the script exits cleanly instead of attempting service restart and markingcloud-final.serviceas degraded.Missing Netfilter Modules (
30-install-packages.sh): Netfilter modules such asiptable_natandxt_commentare packaged underkernel-modules-extraon EL10. Added capability checks (modprobe -n), appendedkernel-modules-extra-$(uname -r)andkernel-modules-extratoextrapkgsunder DNF distros, and re-executed00-modprobe.shright after package installation to load modules into kernel memory.Linked Issue (Required in most cases)
Closes #5368
How I Tested This
make shfmt(0 formatting errors).go test -v ./pkg/cidata/...(All unit tests passed).makeand validated template:./_output/bin/limactl validate templates/_images/almalinux-10.yaml(OK).