Which leads to:
slestemplate:~ # cat /run/cloud-init/cloud-init-generator.log
/usr/lib/systemd/system-generators/cloud-init-generator normal=/run/systemd/generator early=/run/systemd/generator.early late=/run/systemd/generator.late
kernel command line (/proc/cmdline): BOOT_IMAGE=/boot/vmlinuz-4.4.73-5-default root=/dev/mapper/sys0-rootfs splash=silent quiet showopts console=tty0 console=ttyS0,115200
kernel_cmdline found unset
etc_file found unset
default found enabled
checking for datasource
ds-identify rc=1
ds-identify _RET=notfound
cloud-init is enabled but no datasource found, disabling
already disabled: no change needed [no /run/systemd/generator.early/multi-user.target.wants/cloud-init.target
However just using it again with the force option fixes the issue:
I now cloned a VM from the Cloud Init image that I "fixed" by running ds-identify --force, but I am running into the same thing again:
Cloud Init is disabled again, since ds-identify fails to run blkid command:
slestemplate:~ # cat /run/cloud- init/ds- identify. log NAME=Standard PC (i440FX + PIIX, 1996) UUID=0CE53BB3- A48E-44F7- 9EC7-3C339E9C80 D3 NAME=unavailabl e ASSET_TAG= unavailable: error DEVS=unavailabl e:error CMDLINE= BOOT_IMAGE= /boot/vmlinuz- 4.4.73- 5-default root=/dev/ mapper/ sys0-rootfs splash=silent quiet showopts console=tty0 console= ttyS0,115200 NAME=Linux RELEASE= 4.4.73- 5-default VERSION= #1 SMP Tue Jul 4 15:33:39 UTC 2017 (b7ce4e4) x86_64 slestemplate _SYSTEM= GNU/Linux disabled
[… Hostname should have been changed to sles1 by Cloud Init …]
[up 11.01s] ds-identify
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
ERROR: failed running [127]: blkid -c /dev/null -o export
DMI_PRODUCT_
DMI_SYS_VENDOR=QEMU
DMI_PRODUCT_SERIAL=
DMI_PRODUCT_
PID_1_PRODUCT_
DMI_CHASSIS_
FS_LABELS=
ISO9660_
KERNEL_
VIRT=kvm
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_MACHINE=
UNAME_NODENAME=
UNAME_OPERATING
DSNAME=
DSLIST=MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
MODE=search
ON_FOUND=all
ON_MAYBE=all
ON_NOTFOUND=
pid=1138 ppid=1133
is_container=false
ec2 platform is 'Unknown'.
No ds found [mode=search, notfound=disabled]. Disabled cloud-init [1]
[up 11.05s] returning 1
Which leads to: init/cloud- init-generator. log systemd/ system- generators/ cloud-init- generator normal= /run/systemd/ generator early=/ run/systemd/ generator. early late=/run/ systemd/ generator. late /boot/vmlinuz- 4.4.73- 5-default root=/dev/ mapper/ sys0-rootfs splash=silent quiet showopts console=tty0 console= ttyS0,115200 generator. early/multi- user.target. wants/cloud- init.target
slestemplate:~ # cat /run/cloud-
/usr/lib/
kernel command line (/proc/cmdline): BOOT_IMAGE=
kernel_cmdline found unset
etc_file found unset
default found enabled
checking for datasource
ds-identify rc=1
ds-identify _RET=notfound
cloud-init is enabled but no datasource found, disabling
already disabled: no change needed [no /run/systemd/
However just using it again with the force option fixes the issue:
slestemplate:~ # /usr/lib/ cloud-init/ ds-identify --force init/ds- identify. log NAME=Standard PC (i440FX + PIIX, 1996) UUID=0CE53BB3- A48E-44F7- 9EC7-3C339E9C80 D3 NAME=unavailabl e ASSET_TAG= unavailable: error DEVS=unavailabl e:error CMDLINE= BOOT_IMAGE= /boot/vmlinuz- 4.4.73- 5-default root=/dev/ mapper/ sys0-rootfs splash=silent quiet showopts console=tty0 console= ttyS0,115200 NAME=Linux RELEASE= 4.4.73- 5-default VERSION= #1 SMP Tue Jul 4 15:33:39 UTC 2017 (b7ce4e4) x86_64 slestemplate _SYSTEM= GNU/Linux disabled NAME=Standard PC (i440FX + PIIX, 1996) UUID=0CE53BB3- A48E-44F7- 9EC7-3C339E9C80 D3 NAME=unavailabl e ASSET_TAG= DEVS=/dev/ sr0=cidata CMDLINE= BOOT_IMAGE= /boot/vmlinuz- 4.4.73- 5-default root=/dev/ mapper/ sys0-rootfs splash=silent quiet showopts console=tty0 console= ttyS0,115200 NAME=Linux RELEASE= 4.4.73- 5-default VERSION= #1 SMP Tue Jul 4 15:33:39 UTC 2017 (b7ce4e4) x86_64 slestemplate _SYSTEM= GNU/Linux disabled
slestemplate:~ # cat /run/cloud-
[up 11.01s] ds-identify
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
ERROR: failed running [127]: blkid -c /dev/null -o export
DMI_PRODUCT_
DMI_SYS_VENDOR=QEMU
DMI_PRODUCT_SERIAL=
DMI_PRODUCT_
PID_1_PRODUCT_
DMI_CHASSIS_
FS_LABELS=
ISO9660_
KERNEL_
VIRT=kvm
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_MACHINE=
UNAME_NODENAME=
UNAME_OPERATING
DSNAME=
DSLIST=MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
MODE=search
ON_FOUND=all
ON_MAYBE=all
ON_NOTFOUND=
pid=1138 ppid=1133
is_container=false
ec2 platform is 'Unknown'.
No ds found [mode=search, notfound=disabled]. Disabled cloud-init [1]
[up 11.05s] returning 1
[up 544.63s] ds-identify --force
policy loaded: mode=search report=false found=all maybe=all notfound=disabled
no datasource_list found, using default: MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
DMI_PRODUCT_
DMI_SYS_VENDOR=QEMU
DMI_PRODUCT_SERIAL=
DMI_PRODUCT_
PID_1_PRODUCT_
DMI_CHASSIS_
FS_LABELS=cidata
ISO9660_
KERNEL_
VIRT=kvm
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_KERNEL_
UNAME_MACHINE=
UNAME_NODENAME=
UNAME_OPERATING
DSNAME=
DSLIST=MAAS ConfigDrive NoCloud AltCloud Azure Bigstep CloudSigma CloudStack DigitalOcean AliYun Ec2 GCE OpenNebula OpenStack OVF SmartOS Scaleway Hetzner IBMCloud
MODE=search
ON_FOUND=all
ON_MAYBE=all
ON_NOTFOUND=
pid=2762 ppid=2314
is_container=false
check for 'NoCloud' returned found
ec2 platform is 'Unknown'.
Found single datasource: NoCloud
[up 544.70s] returning 0
I can also reproduce the behavior on the template VM just by rebooting it.
It appears that the initial check for NoCloud data source during boot fails. So the caching may not be the issue here. Retitling.