Install cloud-init in ubuntu/noble/desktop image is not working

, ,

Seem that cloud-init is not working in desktop VM.

Try to install the incus-agent and add cloud-init device as it metnionned here:

But cloud-init just not launch at the boot of the VM.

incus launch images:ubuntu/noble/desktop ubuntu-desktop-noble-dev --vm
sleep 30
incus exec ubuntu-desktop-noble-dev -- systemctl is-system-running --wait
incus exec ubuntu-desktop-noble-dev -- bash -c "apt update ; apt install -y cloud-init make incus-agent ; \
systemctl enable cloud-init; systemctl daemon-reload ;\
cloud-init clean --logs"
incus stop ubuntu-desktop-noble-dev
incus publish ubuntu-desktop-noble-dev local: --alias=ubuntu-desktop-noble-dev
incus delete -f ubuntu-desktop-noble-dev

Add in config

incus profile show  ci
config:
  cloud-init.user-data: |
    #cloud-config
    runcmd:
      - [touch, /run/cloud.init.ran]
description: ""
devices: {}
name: ci
used_by: []
project: default



$ incus launch ubuntu-desktop-noble-dev --vm -p default -p ci
Launching the instance
Instance name is: striking-redbird 
$ incus exec striking-redbird bash
root@striking-redbird:~# ll /var/log/cl*
ls: cannot access '/var/log/cl*': No such file or directory
root@striking-redbird:~# dmesg | grep cloud-init
root@striking-redbird:~#  systemctl status cloud-init
○ cloud-init.service - Initial cloud-init job (metadata service crawler)
     Loaded: loaded (/usr/lib/systemd/system/cloud-init.service; enabled; preset: enabled)
     Active: inactive (dead)
root@striking-redbird:~# journalctl -u cloud-init
-- No entries --




start the vm, but cloud-init just not start to run.
no cloud-init log in /var/log

try too with disk but same

incus config device add INSTANCE cloud-init disk source=cloud-init:config

Are there any other steps to enable cloud init operation in the desktop image?

Thanks