Cloud init FAIL: no local data found from DataSourceNoCloud
-
Hi,
I’m looking for help with cloud-init NoCloud on XCP-ng / Xen Orchestra using a custom Oracle Linux 9.6 template.I installed Oracle Linux 9.6 as a VM, then prepared it for cloud-init and converted it into a template.
Installed packages:dnf install -y cloud-init cloud-utils-growpartEnabled services:
systemctl enable cloud-init systemctl enable cloud-init-local systemctl enable cloud-config systemctl enable cloud-finalCleanup before templating:
rm -f /etc/NetworkManager/system-connections/* rm -f /etc/systemd/network/*.link cloud-init clean --logs --machine-id --seed rm -rf /var/lib/cloud/* truncate -s 0 /etc/machine-id rm -f /var/lib/dbus/machine-idmy /etc/cloud/cloud.cfg
# Cloud-init main configuration users: [] disable_root: false preserve_hostname: false datasource_list: [ NoCloud ] datasource: NoCloud: seedfrom: /dev/xvdb cloud_init_modules: - migrator - seed_random - bootcmd - write-files - growpart - resizefs - set_hostname - update_hostname - update_etc_hosts - rsyslog - users-groups - ssh cloud_config_modules: - mounts - locale - set-passwords - timezone - ntp - disable_ec2_metadata cloud_final_modules: - scripts-per-once - scripts-per-boot - scripts-per-instance - scripts-user - final-message system_info: distro: rhel default_user: name: root ssh_svcname: sshd network: config: disabledAfter creating a VM from this template and enabling Cloud Config Drive in Xen Orchestra, cloud-init does not detect NoCloud data.
From /var/log/cloud-init.log:2025-12-31 14:59:08,377 - handlers.py[DEBUG]: finish: init-local/search-NoCloud: FAIL: no local data found from DataSourceNoCloud 2025-12-31 14:59:08,377 - log_util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloud'> failed 2025-12-31 14:59:08,377 - log_util.py[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloud'> failed Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/cloudinit/sources/__init__.py", line 1061, in find_source if s.update_metadata_if_supported( File "/usr/lib/python3.9/site-packages/cloudinit/sources/__init__.py", line 937, in update_metadata_if_supported result = self.get_data() File "/usr/lib/python3.9/site-packages/cloudinit/performance.py", line 103, in decorator return func(*args, **kwargs) File "/usr/lib/python3.9/site-packages/cloudinit/sources/__init__.py", line 493, in get_data return_value = self._check_and_get_data() File "/usr/lib/python3.9/site-packages/cloudinit/sources/__init__.py", line 424, in _check_and_get_data return self._get_data() File "/usr/lib/python3.9/site-packages/cloudinit/sources/DataSourceNoCloud.py", line 181, in _get_data if seedfrom.startswith(proto): AttributeError: 'list' object has no attribute 'startswith'XO creates XO CloudConfigDrive as /dev/xvdb, but cloud init can't read from it or can't event detect it
-
And my cloud config:
#cloud-config hostname: {name}%Network config:
network: version: 1 config: - type: physical name: enX0 subnets: - type: static address: 172.1.1.2 netmask: 255.255.255.0 gateway: 172.1.1.1