Custom user-data via --cicustom not applied on VM boot in Proxmox

rpatavardhan

New Member
Aug 26, 2025
1
0
1
Hi all,

I am trying to deploy a VM with a custom QCOW2 image in Proxmox and want to use a custom cloud-init user-data file to provision it.

I have created my custom user-data file and uploaded it under the local:snippets storage as userdata.yaml. Then I applied it to the VM using the command:
Code:
qm set 999 --cicustom "user=local:snippets/userdata.yaml"

However, when I run the command to dump the cloud-init user-data, my custom configuration is not reflected:
Code:
qm cloudinit dump 999 user
#cloud-config
hostname: rp-cloud-init
manage_etc_hosts: true
fqdn: rp-cloud-init
chpasswd:
  expire: False
users:
  - default
package_upgrade: true

I saw somewhere that the command qm cloudinit dump prints the auto-generated config, not the custom one you provide via --cicustom. However, my VM is not picking up the custom data when it boots up.

Is there a way to verify the custom data that I provided to ensure it is being applied correctly?

Could someone please advise what I might be missing or how to troubleshoot this issue further? I have ensured the snippet file is readable and correctly placed.

Thanks in advance!
 
Last edited:
Greetings,

@rpatavardhan The only sure-fire way to check it is to bring up a VM and then do a sudo cloud-init collect-logs and grovel through it. I must have done that a dozen or two times when debugging my own cloud-init setup recently.

Yes, the dump command will only dump Proxmox's internal state for cloud init, not what you've applied to it.

I will say that while searching for how to build a cloud init, I found that a significant percentage of the problems I've seen folks have is thinking that

Code:
#cloud-config

at the top of the file is just a comment, or is optional. It's a Magic Token that tells the system to do the right thing with it, and if you leave it out...it will fail. If you already knew that, good on ya! But without more information, it's hard to help with what might be going wrong beyond that. The other major failure mode is getting the indentation wrong.

But the best debugging is doing. Bring up the vm with the config, dump the logs, untar them someplace else, and do a lot of grepping (I prefer silversearcher-ag myself) for relevant text. (E.g. if you're trying to add a user farglebugle then ag farglebugle will tell you a lot, even if the results are empty.)
 
  • Like
Reactions: rpatavardhan
However, when I run the command to dump the cloud-init user-data, my custom configuration is not reflected:
The dump command does not consider your custom files. It will only output built-in values, regardless of whether there is an overriding custom setting.

The idea might be that you already have access to custom files, but may want to look at what the result of the built-in settings are.

Also, there is no merging of built-in options and custom options - custom wins.



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