In the case of ConfigDriveMetadata, cloudbase-init tries, by default, to find the metadata in the cdrom, then hard disk, then partition. But the actual order search is not deterministic due to Python internal implementation.
See: https://github.com/cloudbase/cloudbase-init/blob/master/cloudbaseinit/metadata/services/osconfigdrive/windows.py#L219C55-L219C69
This issue https://ask.cloudbase.it/question/3802/filenotfounderror-meta_datajson-not-found-when-config-drive-is-detected-on-hdd-instead-of-cdrom-proxmoxwindows-server-2019/ also presented more evidence on why this might be a problem, if there is also a sort of phantom detection (improper detection of a config drive on the hdd partition 0).
Currently, the partial solution will be to make sure that the search order is deterministic.
The problem with the "ghost" detection will be addressed as soon as I can find a reproduction environment - currently I do not have one. Leaving here the ask issue relevant content.
Hello Cloudbase-Init Team,
I am experiencing an inconsistent issue with Cloudbase-Init (latest version) on Windows Server 2019 Standard VMs running on Proxmox.
Sometimes the VM initializes perfectly, but other times it fails to set up the IP and other configurations because it cannot find the metadata file. After comparing the logs between a successful boot and a failed one, I noticed a significant difference in how the Config Drive is discovered:
Failed Case (Error: FileNotFoundError)
In the failed log, Cloudbase-Init looks for the Config Drive on the HDD (\.\PHYSICALDRIVE0) instead of the CDROM. It seems to find an ISO9660 disk, but then fails to locate meta_data.json in the temporary folder.
Log snippet:
2026-03-04 10:29:43.280 1372 DEBUG cloudbaseinit.metadata.services.osconfigdrive.windows [-] Looking for Config Drive iso in hdd with expected label config-2 ... 2026-03-04 10:29:43.296 1372 INFO cloudbaseinit.metadata.services.osconfigdrive.windows [-] ISO9660 disk found on <disk: \\.\physicaldrive0=""> ... 2026-03-04 10:29:46.374 1372 ERROR cloudbaseinit.shell FileNotFoundError: [Errno 2] No such file or directory: 'C:\Windows\TEMP\tmp93e7vql6\openstack\latest\meta_data.json'
Successful Case In the successful log, the service correctly identifies the Config Drive on D:\ (CDROM).
Log snippet:
2026-03-04 14:31:13.841 4368 DEBUG cloudbaseinit.metadata.services.osconfigdrive.windows [-] Looking for Config Drive iso in cdrom with expected label config-2 ... 2026-03-04 14:31:13.841 4368 INFO cloudbaseinit.metadata.services.osconfigdrive.windows [-] Config Drive found on D:\
In the case of ConfigDriveMetadata, cloudbase-init tries, by default, to find the metadata in the cdrom, then hard disk, then partition. But the actual order search is not deterministic due to Python internal implementation.
See: https://github.com/cloudbase/cloudbase-init/blob/master/cloudbaseinit/metadata/services/osconfigdrive/windows.py#L219C55-L219C69
This issue https://ask.cloudbase.it/question/3802/filenotfounderror-meta_datajson-not-found-when-config-drive-is-detected-on-hdd-instead-of-cdrom-proxmoxwindows-server-2019/ also presented more evidence on why this might be a problem, if there is also a sort of phantom detection (improper detection of a config drive on the hdd partition 0).
Currently, the partial solution will be to make sure that the search order is deterministic.
The problem with the "ghost" detection will be addressed as soon as I can find a reproduction environment - currently I do not have one. Leaving here the ask issue relevant content.