Proxmox ignores custom cloud-init from --cicustom paramter (tested with Ubuntu/CentOS)

As mentioned above, `User`, `Network` and `Metadata` are generated by PVE if no custom config is specified.
No `Vendor` config is generated even if no custom one is specified.
 
  • Like
Reactions: lewinernst
Hi.
I came here to find informations why my hostname isn't set to the vm-name when I specify a custom user cloud-config via
Bash:
qm set <ID> --cicustom "user=local:snippets/ci-users.yaml"
I found that it's due to the fact that the hostname gets written in the auto-generated user cloud-config and that again gets overwritten by our custom one.

My question:
Is there any way to set the hostname dynamically even tho I use a template to generate users
 
  • Like
Reactions: dj423
The hostname can be set via custom metadata part of Cloud Init:
{
"instance-id": "INSTANCEID",
"local-hostname": "HOSTNAME"
}

qm set $VMID -cicustom "meta=$SNIPS/$META,user=$SNIPS/$OSUSER.user"


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox

But than it's not dynamically, isn't it?
I still need to set the variable local-hostname by hand or am I wrong?