I would like to supply custom user data for Cloud-init using `--cicustom`. I would like to re-use a single snippet for all VMs. However, the default user data contains the `hostname` key. Is it possible for Proxmox to substitute it dynamically?
No, its not possible today. You will need to wrap it around with something. What the wrapper is will depend on how you create your VMs.
You can also file an enhancement request as described here: https://forum.proxmox.com/threads/where-to-post-feature-requests.46317/
Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I agree, we have a template and create a snippet per vmid - not pretty but it works. Absent an openstack-like metadata server, your options today are limited.
Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
thats what we do - common NFS snippet storage.I might use NFS for snippets and write them there. Thanks for your comments!
qm cloudinit dump 9000 user
#cloud-config
hostname: tmpl
manage_etc_hosts: true
fqdn: tmpl
chpasswd:
expire: False
users:
- default
package_upgrade: true
qm cloudinit dump 100 user
#cloud-config
hostname: foo
fqdn: foo
# cat 9000.conf
cicustom: vendor=local:snippets/vendor.yaml,network=local:snippets/network.yaml