I am struggling to configure cloud-init via the Proxmox REST API.
I would like to create a VM and customize its cloud-init. The built-in Proxmox cloud-init options (ciuser, cipassword, etc) do not have enough flexibility (for example I can't use it to install qemu-guest-agent).
You can configure cloud-init via a snippet, but there is no way to upload a snippet via the REST API.
You can configure cloud-init via a custom ISO, which *can* be uploaded via the REST API. Unfortunately, it seems that Proxmox recognises when you've attached a custom cloud-init ISO, and tries to help by regenerating the cloud-init ISO when starting the new VM, but this fails
Is there a way around this? I want to use only the REST API.
I would like to create a VM and customize its cloud-init. The built-in Proxmox cloud-init options (ciuser, cipassword, etc) do not have enough flexibility (for example I can't use it to install qemu-guest-agent).
You can configure cloud-init via a snippet, but there is no way to upload a snippet via the REST API.
You can configure cloud-init via a custom ISO, which *can* be uploaded via the REST API. Unfortunately, it seems that Proxmox recognises when you've attached a custom cloud-init ISO, and tries to help by regenerating the cloud-init ISO when starting the new VM, but this fails
generating cloud-init ISO
TASK ERROR: command 'set -o pipefail && genisoimage -quiet -iso-level 3 -R -V cidata /run/pve/cloudinit/100/ | qemu-img dd -n -f raw -O raw 'isize=0' 'osize=67584' 'of=/var/lib/vz/template/iso/vm-100-cloudinit.iso'' failed: exit code 141
Is there a way around this? I want to use only the REST API.