There's a known issue (https://bugzilla.proxmox.com/show_bug.cgi?id=1739) where "each time you update the cloud-init configuration, or manualy regenerate the image, the instance-id is changed."
To ensure that `instance_id` never changes again unless we explicitly do so—the only 'foolproof' solution—we have chosen to write meta-configs with a self-generated `instance_id`. This advice is also given in a number of forum posts and in the bug tracker.
However, that does not work. Here is an example VM (236). You can see that `cicustom` contains the meta-config, and it contains an `instance-id`, but it is not picked up.
I'm going to look into this further. But does anyone see/understand what is going wrong here?
To ensure that `instance_id` never changes again unless we explicitly do so—the only 'foolproof' solution—we have chosen to write meta-configs with a self-generated `instance_id`. This advice is also given in a number of forum posts and in the bug tracker.
However, that does not work. Here is an example VM (236). You can see that `cicustom` contains the meta-config, and it contains an `instance-id`, but it is not picked up.
Code:
root@pve-test:/mnt/pve/CIFS_Test# pvesh get /nodes/pve-test/qemu/236/cloudinit
┌────────────┬────────┬───────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────
│ key │ delete │ pending │ value
╞════════════╪════════╪═══════════════════════════════════════════════════════════════════════╪════════════════════════════════════════════════════════════════════════════════════════════════════════
│ cicustom │ │ │ meta=CIFS_Test:snippets/2-236-meta.yaml,user=CIFS_Test:snippets/2-236.yaml,vendor=CIFS_Test:snippets/ve
├────────────┼────────┼───────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────
│ nameserver │ │ 2a0c:eb00:0:f7::38 2a0c:eb00:0:f7::39 185.233.175.229 185.233.175.243 │
└────────────┴────────┴───────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────
root@pve-test:/mnt/pve/CIFS_Test# cat snippets/2-236-meta.yaml
#cloud-config
instance-id: 579229cbcd5cb55cdff9cdc1539d48931f1d7723
root@pve-test:/mnt/pve/CIFS_Test# qm cloudinit dump 236 meta
instance-id: 6e94e23bd69a9c5268d9dadd6b484543d4f117a2
I'm going to look into this further. But does anyone see/understand what is going wrong here?