cloud-init failed execution / qemu agent exec status exitcode 2 when using files[].contentFrom
What steps did you take and what happened:
When adding files to bootstrap configtemplate or controlplane definition using contentFrom secret or configMap, new machines fail to provision with machine status indicating.
* InfrastructureReady: cloud-init failed execution
* NodeHealthy: Waiting for ProxmoxMachine to report spec.providerID
The VM itself starts up fine, cloud-init runs to completion and it joins the cluster as far as kubernetes is concerned. The files loaded regularly and via contentFrom secret and configmap are all there on the VM.
I'm not sure how to troubleshoot further to determine what the qemu-agent exit code of 2 means or what its doing at that point that leads the the machine status being marked as 'failed' seemingly before cloud-init starts of while it's still running. The capmox controller log and kubectl get -o yaml outputs for the machine and proxmoxmachine are attached.
What did you expect to happen: Able to use files[].contentFrom.{secret/configMap} successfully for bootstrap and controlplane providers.
Anything else you would like to add: I'm using caprke2 https://github.com/rancher/cluster-api-provider-rke2 / https://caprke2.docs.rancher.com/. I haven't tried kubeadm with contentFrom. https://cluster-api.sigs.k8s.io/tasks/bootstrap/kubeadm-bootstrap/#additional-features
Environment:
- Proxmox version: 8.4.11
- Cluster-api-provider-proxmox version: v0.7.4
- Kubernetes version: (use
kubectl version): Rancher kubernetes v1.33.5+rke2r1 - OS (e.g. from
/etc/os-release): Rocky Linux 10.0 (Red Quartz). I also tried with Ubuntu 24.04.3 LTS (Noble Numbat), no difference.