Skip to content

feat(templates): add Fedora 44 template; remove Fedora 41 template#4905

Draft
valdela1 wants to merge 1 commit intolima-vm:masterfrom
valdela1:fedora_templates
Draft

feat(templates): add Fedora 44 template; remove Fedora 41 template#4905
valdela1 wants to merge 1 commit intolima-vm:masterfrom
valdela1:fedora_templates

Conversation

@valdela1
Copy link
Copy Markdown
Contributor

Hello,

Fedora 44 VM is usable but there is an error with cloud-init-main.service:

$ sudo cloud-init status --long
status: error
extended_status: error - done
boot_status_code: enabled-by-generator
last_update: Thu, 01 Jan 1970 00:00:55 +0000
detail: DataSourceNoCloud [seed=/dev/sr0]
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.
        - 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 set the hostname to lima-testvm (lima-testvm)
        - Failed to set the hostname to lima-testvm (lima-testvm)
        - Failed to set the hostname to lima-testvm (lima-testvm)
        - 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.14/site-packages/cloudinit/config/cc_scripts_per_boot.py'>) failed

I think this problem can be resolved later, I will try to fix it.

Regards

@valdela1
Copy link
Copy Markdown
Contributor Author

I think this problem can be resolved later

Maybe not because tests failed. I will try to fix it.

@valdela1
Copy link
Copy Markdown
Contributor Author

The problem is related to containerd-rootless-setuptool.sh:

Apr 29 19:02:36 lima-testvm44 cloud-init[980]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin containerd-rootless-setuptool.sh install
Apr 29 19:02:36 lima-testvm44 sudo[2936]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin ; COMMAND=/bin/bash --login -c 'containerd-rootless-setuptool\\.sh install'
Apr 29 19:02:37 lima-testvm44 cloud-init[980]: [ERROR] Needs systemd (systemctl --user)
Apr 29 19:02:37 lima-testvm44 cloud-init[980]: LIMA 2026-04-29T19:02:37+02:00| WARNING: Failed to execute /mnt/lima-cidata/boot.Linux/40-install-containerd.sh
Apr 29 19:02:37 lima-testvm44 cloud-init[980]: LIMA 2026-04-29T19:02:37+02:00| Exiting with code 1
Apr 29 19:02:37 lima-testvm44 cloud-init[980]: 2026-04-29 17:02:37,682 - cc_scripts_per_boot.py[WARNING]: Failed to run module scripts_per_boot (per-boot in /var/lib/cloud/scripts/per-boot)
Apr 29 19:02:37 lima-testvm44 cloud-init[980]: 2026-04-29 17:02:37,683 - log_util.py[WARNING]: Running module scripts_per_boot (<module 'cloudinit.config.cc_scripts_per_boot' from '/usr/lib/python3.14/site-packages/cloudinit/config/cc_scripts_per_boot.py'>) failed

The problematic part is:

        # detect systemd
        if ! systemctl --user show-environment >/dev/null 2>&1; then
                ERROR "Needs systemd (systemctl --user)"
                exit 1
        fi

At each reboot, the same problem occurs. What I don't understand is that if I change one line in /usr/local/bin/containerd-rootless-setuptool.sh like this, the problem seems to be solved after reboot:

-        if ! systemctl --user show-environment >/dev/null 2>&1; then
+        if ! systemctl --user show-environment 2>&1; then
Apr 29 19:08:59 lima-testvm44 cloud-init[956]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin containerd-rootless-setuptool.sh install
Apr 29 19:08:59 lima-testvm44 sudo[1795]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin ; COMMAND=/bin/bash --login -c 'containerd-rootless-setuptool\\.sh install'
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: HOME=/home/testuser.guest
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: LANG=en_US.UTF-8
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: LOGNAME=testuser
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: PATH=/usr/local/bin:/usr/bin
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: SHELL=/bin/bash
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: USER=testuser
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: XDG_RUNTIME_DIR=/run/user/1000
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: HOME=/home/testuser.guest
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: LANG=en_US.UTF-8
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: LOGNAME=testuser
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: PATH=/usr/local/bin:/usr/bin
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: SHELL=/bin/bash
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: USER=testuser
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: XDG_RUNTIME_DIR=/run/user/1000
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Apr 29 19:09:00 lima-testvm44 cloud-init[956]: [INFO] Checking RootlessKit functionality
Apr 29 19:09:01 lima-testvm44 cloud-init[956]: [INFO] Checking cgroup v2
Apr 29 19:09:01 lima-testvm44 cloud-init[956]: [INFO] Checking overlayfs
Apr 29 19:09:01 lima-testvm44 cloud-init[956]: [INFO] Requirements are satisfied
Apr 29 19:09:01 lima-testvm44 cloud-init[956]: [INFO] Creating "/home/testuser.guest/.config/systemd/user/containerd.service"
Apr 29 19:09:01 lima-testvm44 cloud-init[956]: [INFO] Starting systemd unit "containerd.service"

This is beyond my understanding, if someone can help.

Thanks

@afbjorklund
Copy link
Copy Markdown
Member

That script comes from here: https://github.com/containerd/nerdctl (in extras/rootless)

So might need to report the issue there as well?

Could be educational to run the command with stderr, to see what systemd complains about?

systemctl --user show-environment >/dev/null

@valdela1
Copy link
Copy Markdown
Contributor Author

Another problem is this starting from second boot (first one is OK):

Apr 29 19:34:41 lima-testvm44 sudo[1327]:     root : PWD=/home/testuser.guest ; USER=testuser ; COMMAND=/bin/bash --login -c 'sh -ec systemctl\\ --user\\ show\\ --property\\=RefuseManualStart\\ --value\\ dbus'
Apr 29 19:34:42 lima-testvm44 cloud-init[929]: + '[' no '!=' yes ']'
Apr 29 19:34:42 lima-testvm44 cloud-init[929]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 systemctl --user enable --now dbus
Apr 29 19:34:42 lima-testvm44 sudo[1356]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/bin/bash --login -c 'systemctl --user enable --now dbus'
Apr 29 19:34:42 lima-testvm44 cloud-init[929]: Failed to enable unit: Refusing to operate on linked unit file dbus.service
Apr 29 19:34:42 lima-testvm44 cloud-init[929]: LIMA 2026-04-29T19:34:42+02:00| WARNING: Failed to execute /mnt/lima-cidata/boot.Linux/40-install-containerd.sh

Potentially a quickfix:

diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh b/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
index 40530c82..9521a348 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
@@ -120,7 +120,7 @@ EOF
                        setenforce 0
                fi
                if [ "$(sudo -iu "${LIMA_CIDATA_USER}" sh -ec 'systemctl --user show --property=RefuseManualStart --value dbus')" != "yes" ]; then
-                       sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" systemctl --user enable --now dbus
+                       sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" systemctl --user enable --now dbus-broker
                fi
                sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" "PATH=${PATH}" containerd-rootless-setuptool.sh install
                sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" "PATH=${PATH}" \

Of what I understand, dbus-broker is a new service and replace legacy dbus, but again this is beyond my understanding and could be totally false.

@afbjorklund

This comment was marked as resolved.

@valdela1
Copy link
Copy Markdown
Contributor Author

valdela1 commented Apr 29, 2026

That script comes from here: https://github.com/containerd/nerdctl (in extras/rootless)

So might need to report the issue there as well?

I will open an issue there.

Could be educational to run the command with stderr, to see what systemd complains about?

systemctl --user show-environment >/dev/null

When I modify the line like this:

-        if ! systemctl --user show-environment >/dev/null 2>&1; then
+        if ! systemctl --user show-environment >/dev/null; then

I don't have the problem, it seems solved after reboot:

Apr 29 19:46:07 lima-testvm44 sudo[1352]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/bin/bash --login -c 'systemctl --user enable --now dbus-broker'
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin containerd-rootless-setuptool.sh install
Apr 29 19:46:07 lima-testvm44 sudo[1394]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin ; COMMAND=/bin/bash --login -c 'containerd-rootless-setuptool\\.sh install'
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Checking RootlessKit functionality
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Checking cgroup v2
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Checking overlayfs
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Requirements are satisfied
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Creating "/home/testuser.guest/.config/systemd/user/containerd.service"
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: [INFO] Starting systemd unit "containerd.service"
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: + systemctl --user start containerd.service
Apr 29 19:46:07 lima-testvm44 cloud-init[921]: + sleep 3
Apr 29 19:46:10 lima-testvm44 cloud-init[921]: + systemctl --user --no-pager --full status containerd.service

@afbjorklund
Copy link
Copy Markdown
Member

afbjorklund commented Apr 29, 2026

Right, but now you have also changed it to (the incompatble) dbus-broker.service in the output line above...

But changing to dbus.socket should be safe, and start either dbus.service or dbus-broker.service when called

@valdela1
Copy link
Copy Markdown
Contributor Author

Probably the same root cause for both, maybe you could start dbus.socket instead?

I tried this:

diff --git a/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh b/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
index 40530c82..5ebe4e44 100644
--- a/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
+++ b/pkg/cidata/cidata.TEMPLATE.d/boot.Linux/40-install-containerd.sh
@@ -120,7 +120,7 @@ EOF
                        setenforce 0
                fi
                if [ "$(sudo -iu "${LIMA_CIDATA_USER}" sh -ec 'systemctl --user show --property=RefuseManualStart --value dbus')" != "yes" ]; then
-                       sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" systemctl --user enable --now dbus
+                       sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" systemctl --user enable --now dbus.socket
                fi
                sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" "PATH=${PATH}" containerd-rootless-setuptool.sh install
                sudo -iu "${LIMA_CIDATA_USER}" "XDG_RUNTIME_DIR=/run/user/${LIMA_CIDATA_UID}" "PATH=${PATH}" \

It fixes dbus problem but there is still the one with containerd-rootless-setuptool.sh at each reboot:

Apr 29 19:53:45 lima-testvm44 sudo[1353]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/bin/bash --login -c 'systemctl --user enable --now dbus\\.socket'
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin containerd-rootless-setuptool.sh install
Apr 29 19:53:46 lima-testvm44 sudo[1393]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin ; COMMAND=/bin/bash --login -c 'containerd-rootless-setuptool\\.sh install'
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: [ERROR] Needs systemd (systemctl --user)
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: LIMA 2026-04-29T19:53:46+02:00| WARNING: Failed to execute /mnt/lima-cidata/boot.Linux/40-install-containerd.sh
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: LIMA 2026-04-29T19:53:46+02:00| Exiting with code 1
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: 2026-04-29 17:53:46,270 - cc_scripts_per_boot.py[WARNING]: Failed to run module scripts_per_boot (per-boot in /var/lib/cloud/scripts/per-boot)
Apr 29 19:53:46 lima-testvm44 cloud-init[923]: 2026-04-29 17:53:46,271 - log_util.py[WARNING]: Running module scripts_per_boot (<module 'cloudinit.config.cc_scripts_per_boot' from '/usr/lib/python3.14/site-packages/cloudinit/config/cc_scripts_per_boot.py'>) failed

Now if I retry this:

-        if ! systemctl --user show-environment >/dev/null 2>&1; then
+        if ! systemctl --user show-environment >/dev/null; then

Problem solved after reboot:

Apr 29 20:00:34 lima-testvm44 sudo[1358]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 ; COMMAND=/bin/bash --login -c 'systemctl --user enable --now dbus\\.socket'
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: + sudo -iu testuser XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin containerd-rootless-setuptool.sh install
Apr 29 20:00:35 lima-testvm44 sudo[1398]:     root : PWD=/home/testuser.guest ; USER=testuser ; ENV=XDG_RUNTIME_DIR=/run/user/1000 PATH=/mnt/lima-cidata/util:/usr/local/bin:/usr/bin ; COMMAND=/bin/bash --login -c 'containerd-rootless-setuptool\\.sh install'
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Checking RootlessKit functionality
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Checking cgroup v2
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Checking overlayfs
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Requirements are satisfied
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Creating "/home/testuser.guest/.config/systemd/user/containerd.service"
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: [INFO] Starting systemd unit "containerd.service"
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: + systemctl --user start containerd.service
Apr 29 20:00:35 lima-testvm44 cloud-init[927]: + sleep 3
Apr 29 20:00:38 lima-testvm44 cloud-init[927]: + systemctl --user --no-pager --full status containerd.service

@valdela1
Copy link
Copy Markdown
Contributor Author

If I execute after login $ containerd-rootless-setuptool.sh install without modification, then problem is also solved after reboot.

I really don't understand problem's cause.

Comment thread templates/README.md

Update the Fedora Linux image location to version 41 in ~/.lima/fedora/lima.yaml:
$ $(basename "${BASH_SOURCE[0]}") --version 41 ~/.lima/fedora/lima.yaml
Update the Fedora Linux image location to version 44 in ~/.lima/fedora/lima.yaml:
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.

No need to update this example every time

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok for next time, I suppose now that it's in place, we might as well leave it ?

@afbjorklund
Copy link
Copy Markdown
Member

afbjorklund commented Apr 29, 2026

I really don't understand problem's cause.

I traced it, and there is a new feature in systemd less.

Apparently it now also requires TERM to be set... (?)
But it seems to be less failing, and systemctl hiding:

[pid  2481] execve("/usr/bin/systemctl", ["systemctl", "--user", "show-environment"], 0x55a93830cab0 /* 29 vars */) = 0

[pid  2482] execve("/usr/bin/less", ["less"], 0x562b843703c0 /* 32 vars */ <unfinished ...>

[pid  2482] access("/etc/terminfo/./u/unknown", R_OK) = -1 ENOENT (No such file or directory)
[pid  2482] access("/usr/share/terminfo/./u/unknown", R_OK) = -1 ENOENT (No such file or directory)
[pid  2482] write(2, "'unknown': unknown terminal type"..., 34) = 34
[pid  2482] exit_group(1)               = ?
[pid  2482] +++ exited with 1 +++
[pid  2481] <... waitid resumed>, {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2482, si_uid=1000, si_status=1, si_utime=0, si_stime=0}, WEXITED, NULL) = 0
[pid  2481] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2482, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
[pid  2481] exit_group(0)               = ?
[pid  2481] +++ exited with 0 +++

So adding "TERM=${TERM}" makes it happy again.
It goes in after the already existing "PATH=${PATH}"


Fedora 43

less 685 (POSIX regular expressions)
Copyright (C) 1984-2025 Mark Nudelman

WARNING: terminal is not fully functional
0

Fedora 44

less 691 (POSIX regular expressions)
Copyright (C) 1984-2025 Mark Nudelman

'unknown': unknown terminal type.
1

@valdela1 valdela1 force-pushed the fedora_templates branch 2 times, most recently from fca6846 to 3390b40 Compare April 29, 2026 23:04
Signed-off-by: Valentin Dela <valdela@netc.fr>
@afbjorklund
Copy link
Copy Markdown
Member

Please do two commits, the words "and" and "also" in commit messages are usually a warning sign :-)

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.

3 participants