Cloudbase +Win10 +MaaS = cloudinit.sources.DataSourceNotFoundException
I'm having a bit of a rough time attempting to set up a Windows 10 image for a MaaS service. (note: this is not a production thing at this stage)
Thus far, I've set up the service which is happily downloading Ubuntu cloud images and installing them into either Proxmox virtual machines or physical workstations. Of course, the challenge now has been to do the same with a Win10 image and Cloudbase-init (at least in a virtual sense).
I've used the Cloudbase Windows Imaging Tools, customizing config.ini and cloudbase-init.conf and cloudbase-init-unattend.conf files, then building the image.
This has resulted in a no-error build that leaves me with a (rather large) RAW image file that is compressed to tgz. I upload to maas and import to boot-resources without error. The image sync's and tells me it's ready. (at this point, I almost feel accomplished since this isn't my usual jam...)
Yet - there is where the fun stops. On deployment, cloud-init reports the following:
Ubuntu 22.04.4 LTS ubuntu tty1
ubuntu login: [ OK ] Listening on Socket for unix for snap application lxd.daemon.
[ OK ] Listening on Socket for unix for snap application lxd.user-daemon.
Starting Service for snap application lxd.activate...
[ OK ] Finished Service for snap applicaiton lxd.activate.
[ OK ] Started snap.lxd.hook.configure-8223c7b7-ca9d-4d5b-b1b8-cdde8aca77f3.scope.
Starting Time & Date Service...
[ OK ] Started Time & Date Service.
[ 27.743767] cloud-init [1519]: Can not apply stage config, no datasource found! Likely bad things to come!
[ 27.743894] cloud-init [1519]: ---------------------------------------------------------
[ 27.744192] cloud-init [1519]: Traceback (most recent call last):
[ 27.744273] cloud-init [1519]: File "/usr/lib.python3/dist-packages/cloudinit/cmd/main.py", line 597, in main_modules
[ 27.744334] cloud-init [1519]: init.fetch(exisitng="trust")
[ 27.744382] cloud-init [1519]: File "/usr/lib.python3/dist-packages/cloudinit/stages.py", line 501, in fetch
[ 27.744440] cloud-init [1519]: return self._get_data_source(existing=existing)
[ 27.744494] cloud-init [1519]: File "/usr/lib.python3/dist-packages/cloudinit/stages.py", line 366, in _get_data_source
[ 27.744557] cloud-init [1519]: (ds, dnsname) = sources.find.source(
[ 27.744604] cloud-init [1519]: File "/usr/lib.python3/dist-packages/cloudinit/sources/__init__.py", line 1039, in find_sources
[ 27.744665] cloud-init [1519]: raise DataSourceNotFoundException(msg)
[ 27.744713] cloud-init [1519]: cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
[ 27.744774] cloud-init [1519]: ---------------------------------------------------------
I'm unsure if I have a MaaS problem, or an image/config problem (I'm leaning towards the latter since ubuntu cloud images deploy flawlessly).
The only areas that I'm aware of for cloudbase that configure metadata services are the two cloudbase-init(-unattend).conf
files. For this case, the configuration is set to the following:
cloudbase-init.conf
[DEFAULT]
username=Administrator
groups=Administrators
inject_user_password=true
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\
verbose=true
debug=true
log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\
log_file=cloudbase-init.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
logging_serial_port_settings=
mtu_use_dhcp_config=true ...