Skip to content

cidata: skip set-name for slirp NIC to fix ubuntu-26.04 first-boot delay#5070

Draft
itsme-ranger wants to merge 2 commits into
lima-vm:masterfrom
itsme-ranger:fix/ubuntu-26-04-boot-delay
Draft

cidata: skip set-name for slirp NIC to fix ubuntu-26.04 first-boot delay#5070
itsme-ranger wants to merge 2 commits into
lima-vm:masterfrom
itsme-ranger:fix/ubuntu-26-04-boot-delay

Conversation

@itsme-ranger
Copy link
Copy Markdown

@itsme-ranger itsme-ranger commented Jun 1, 2026

What This PR Changes

Skips set-name for Lima's built-in slirp NIC in the network-config cloud-init template. Also removes a hardcoded eth0 interface name from the proxy-settings check in hack/test-templates.sh.

Linked Issue

Closes #4792

How I Tested This

Verified the template renders correctly (unit tests pass). End-to-end boot test on a fresh template:ubuntu-26.04 instance is required to confirm the 2-minute delay is gone — I don't have an environment to run that locally

@itsme-ranger itsme-ranger force-pushed the fix/ubuntu-26-04-boot-delay branch 2 times, most recently from 86d75ec to feffcf5 Compare June 2, 2026 00:07
match:
macaddress: '{{$nw.MACAddress}}'
dhcp4: true
{{- if ne $nw.Interface $.SlirpNICName }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment line to explain the reason

@AkihiroSuda
Copy link
Copy Markdown
Member

Apparently breaking several tests including Colima https://github.com/lima-vm/lima/actions/runs/26789894308/job/78973801469?pr=5070

# time="2026-06-02T00:12:00Z" level=fatal msg="error starting vm: error at 'creating and starting': error setting up DNS: failed to restart dnsmasq service: error running [lima sudo systemctl restart dnsmasq], output: \"Job for dnsmasq.service failed because the control process exited with error code.\", err: \"exit status 1\""

On ubuntu-26.04, systemd-networkd-wait-online is configured by netplan to
wait for eth0 before it exists. On first boot the NIC is still enp0s1 —
the udev rename hasn't happened yet — causing a 120s timeout.

Marking the slirp NIC as optional (netplan optional: true ->
RequiredForOnline=no in systemd-networkd) tells wait-online to not block
on eth0, so boot completes immediately. The interface is still renamed to
eth0 after boot, preserving existing behaviour for all other tools.

Fixes: lima-vm#4792

Signed-off-by: Ramadhan Gerry Akbar <ramadhan.gerry@gmail.com>
@itsme-ranger itsme-ranger force-pushed the fix/ubuntu-26-04-boot-delay branch from feffcf5 to c719ef8 Compare June 2, 2026 09:49
…boot delay"

optional: true causes systemd-networkd-wait-online to complete before DHCP
assigns an IP on some distro/driver combinations (observed: ubuntu-25.10 on
vz), breaking Lima's SSH connectivity to the VM.

Both approaches tried so far (removing set-name, adding optional: true) are
too broad — they affect all distros since network-config has no per-distro
awareness. Reverting until a targeted fix is found.

Signed-off-by: Ramadhan Gerry Akbar <ramadhan.gerry@gmail.com>
@itsme-ranger itsme-ranger marked this pull request as draft June 3, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lima with ubuntu-26.04 times out during boot after waiting 2 minutes for network connectivity

2 participants