Rocky10: systemd-resolved.service: Unit systemd-resolved.service not found
Author: reegnzCreated Sep 8, 2026Updated Sep 9, 2026
Labelsbugguest/el10
Description
When launching the rocky-10 template cloud-init fails with this error:
status: error
extended_status: error - done
boot_status_code: enabled-by-generator
last_update: Thu, 01 Jan 1970 00:01:21 +0000
detail: DataSourceNoCloud [seed=/dev/vdb]
errors:
- ('scripts_per_boot', RuntimeError('Runparts: 1 failures (00-lima.boot.sh) in 1 attempted commands'))
recoverable_errors:
DEPRECATED:
- Deprecated cloud-config provided: users.0.ssh-authorized-keys: Deprecated in version 18.3. Use **ssh_authorized_keys** instead., users.0.uid: Changed in version 22.3. The use of ``string`` type is deprecated. Use an ``integer`` instead.
WARNING:
- Failed to run module scripts_per_boot (per-boot in /var/lib/cloud/scripts/per-boot)
- Running module scripts_per_boot (<module 'cloudinit.config.cc_scripts_per_boot' from '/usr/lib/python3.12/site-packages/cloudinit/config/cc_scripts_per_boot.py'>) failedDigging deeper in the cloud init logs I've found this:
+ systemctl restart systemd-resolved.service
Failed to restart systemd-resolved.service: Unit systemd-resolved.service not found.I've done a root-cause analysis on this and found the following: https://github.com/lima-vm/lima/blob/1973a8c6801e172ee89bc3d998cd1c5ea60a9235/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/06-enable-mdns-on-systemd.sh#L13-L15
This code assumes resolvectl is installed with systemd-resolved package, but on rocky it is installed with the systemd package.
An additional check like systemctl cat systemd-resolved.service >/dev/null 2>&1 || exit 0 would make the script work properly.
Command to reproduce:
limactl start template:rocky-10Source: lima-vm/lima