Hi team,
I’m trying to build a customized image(only pre-install the openssh-server) based on Plucky(25.04) desktop
on MAAS 3.2.11.
During the installation, I can see the rootfs.tgz was extracted to the target disk and the machine booted into OS, but the state was still in deploying.
After some investigation, I found that the cloud-init config files haven’t been generated, even in the installation log, every command from a chroot env returned 0.
Following is the installation log from one of maas node.
Configuring target system for distro: ubuntu osfamily: debian
start: cmd-install/stage-curthooks/builtin/cmd-curthooks/writing-apt-config: configuring apt configuring apt
Transferred {'grub2': 'grub2 grub2/update_nvram boolean false', 'maas': 'cloud-init cloud-init/datasources multiselect MAAS\ncloud-init cloud-init/maas-metadata-url string http://10.102.160.2:5248/MAAS/metadata/\ncloud-init cloud-init/maas-metadata-credentials string oauth_consumer_key=RNyBx4efYJexsLV9jX&oauth_token_key=rkhGPHZWFvaV74h5kS&oauth_token_secret=mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\ncloud-init cloud-init/local-cloud-config string manage_etc_hosts: true\\nmanual_cache_clean: true\\nreporting:\\n maas:\\n consumer_key: RNyBx4efYJexsLV9jX\\n endpoint: http://10.102.160.2:5248/MAAS/metadata/status/dntx7k\\n token_key: rkhGPHZWFvaV74h5kS\\n token_secret: mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\\n type: webhook\\n\n'} into new format: {'preserve_sources_list': False, 'sources_list': 'deb http://archive.ubuntu.com/ubuntu $RELEASE main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-updates main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-updates main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-security main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-security main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-backports main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-backports main universe multiverse restricted\n', 'debconf_selections': {'grub2': 'grub2 grub2/update_nvram boolean false', 'maas': 'cloud-init cloud-init/datasources multiselect MAAS\ncloud-init cloud-init/maas-metadata-url string http://10.102.160.2:5248/MAAS/metadata/\ncloud-init cloud-init/maas-metadata-credentials string oauth_consumer_key=RNyBx4efYJexsLV9jX&oauth_token_key=rkhGPHZWFvaV74h5kS&oauth_token_secret=mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\ncloud-init cloud-init/local-cloud-config string manage_etc_hosts: true\\nmanual_cache_clean: true\\nreporting:\\n maas:\\n consumer_key: RNyBx4efYJexsLV9jX\\n endpoint: http://10.102.160.2:5248/MAAS/metadata/status/dntx7k\\n token_key: rkhGPHZWFvaV74h5kS\\n token_secret: mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\\n type: webhook\\n\n'}}
curthooks handling apt to target /tmp/tmp2mgr_qx3/target with config {'preserve_sources_list': False, 'sources_list': 'deb http://archive.ubuntu.com/ubuntu $RELEASE main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-updates main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-updates main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-security main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-security main universe multiverse restricted\ndeb http://archive.ubuntu.com/ubuntu $RELEASE-backports main universe multiverse restricted\n# deb-src http://archive.ubuntu.com/ubuntu $RELEASE-backports main universe multiverse restricted\n', 'debconf_selections': {'grub2': 'grub2 grub2/update_nvram boolean false', 'maas': 'cloud-init cloud-init/datasources multiselect MAAS\ncloud-init cloud-init/maas-metadata-url string http://10.102.160.2:5248/MAAS/metadata/\ncloud-init cloud-init/maas-metadata-credentials string oauth_consumer_key=RNyBx4efYJexsLV9jX&oauth_token_key=rkhGPHZWFvaV74h5kS&oauth_token_secret=mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\ncloud-init cloud-init/local-cloud-config string manage_etc_hosts: true\\nmanual_cache_clean: true\\nreporting:\\n maas:\\n consumer_key: RNyBx4efYJexsLV9jX\\n endpoint: http://10.102.160.2:5248/MAAS/metadata/status/dntx7k\\n token_key: rkhGPHZWFvaV74h5kS\\n token_secret: mZHnFP79FNHaPa3q9WQfpa5JjJhf379D\\n type: webhook\\n\n'}}
Running command ['unshare', '--help'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'lsb_release', '--all'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'dpkg', '--print-architecture'] with allowed return codes [0] (capture=True)
got primary mirror: None
got security mirror: None
Apt Mirror info: {'PRIMARY': 'http://archive.ubuntu.com/ubuntu/', 'SECURITY': 'http://security.ubuntu.com/ubuntu/', 'MIRROR': 'http://archive.ubuntu.com/ubuntu/'}
Applying debconf selections
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'debconf-set-selections'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'dpkg-query', '--list'] with allowed return codes [0] (capture=True)
unconfiguring cloud-init
cleaning cloud-init config from: ['/tmp/tmp2mgr_qx3/target/etc/cloud/cloud.cfg.d/90_dpkg.cfg']
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'dpkg-reconfigure', '--frontend=noninteractive', 'cloud-init'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2mgr_qx3/target', 'dpkg-query', '--show', '--showformat', '${Version}', 'cloud-init'] with allowed return codes [0] (capture=True)
Set preserve_sources_list to True in /etc/cloud/cloud.cfg.d/curtin-preserve-sources.cfg with: {'apt': {'preserve_sources_list': True}}
I used the same way to create couple of customized images from 20.04 to 24.10, they all worked, but not for 25.04, could someone please help on this issue?
Thanks.