Cloud-Init config not applying to VM

devswanny

New Member
Mar 25, 2025
7
0
1
I have created a few cloud init config files and have applied them using the qm set 8002 --cicustom "user=Alpha-1:snippets/user.yaml", but when I use cloudinit dump, it jut shows the default config. When i clone the template and boot the virtual machine it fails to load my custom config and uses the proxmox default one.

This is a sanitised user config:

YAML:
#cloud-config

users:

  - name: swan
    sudo: ALL=(ALL) NOPASSWD:ALL
    home: /home/swan
    shell: /bin/bash
    groups: [users, sudo]
    lock_passwd: True
    gecos: Swan
    ssh_authorized_keys:
    - ssh-rsa
    - ssh-rsa


Thanks,
Swan
 
Last edited:
At the moment my cloud init throws out a qcow2, what do i need to do to check the contents of it?
I think you are likely mistaken about it. But if your cloudinit image is indeed qcow, you can plug this into google: how to mount qcow2 image in linux

You can find the path to your CI by examining "qm config [vmid]" output.

cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
I think you are likely mistaken about it. But if your cloudinit image is indeed qcow, you can plug this into google: how to mount qcow2 image in linux

You can find the path to your CI by examining "qm config [vmid]" output.

cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Sorry for my late reply, I had some complicated work stuff going on. I just checked the qcow2 image, and none of what I had added with the CLI was present. How would you suggest i move foward?
 
I just checked the qcow2 image, and none of what I had added with the CLI was present. How would you suggest i move foward?
I am, frankly, not sure where you stand as of today and what the issue is.

Perhaps, review your steps and configuration, restate the issue you want to resolve and provide an updated set of configuration, outputs, etc.

cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
My current issue is that setting custom configuration does not apply them to the template, the vm, or the cloud init image. I don't know what is causing them not to apply.
 
You may want to carefully review this thread that is happening at the same time:

While not everything will apply, many if not most of the troubleshooting steps are applicable. This thread also contains a good example of data that one would need to provide for troubleshooting.

Cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
You may want to carefully review this thread that is happening at the same time:

While not everything will apply, many if not most of the troubleshooting steps are applicable. This thread also contains a good example of data that one would need to provide for troubleshooting.

Cheers


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

OK, i had a read of that thread.

I can tell you that it works with the builtin configuration, and that if I configure it in the gui, it works perfectly. My current issue is that if I use the CLI to add custom config, like installing apt packages, and creating users, they just don't get built into the cloudinit image. I have tried opening the cloudinit image in the host terminal, and it simply displays the contents of what is configured in the gui.
 
A few things to consider:
- The GUI will _always_ reflect only built-in information. It does not, in any way, reflect your custom configuration
- The custom configuration is only referenced during the ISO build step
- The custom configuration is not checked for syntax, only for presence of the file
- If, after generating ISO with custom specification, you only see built-in information in the configuration files on the ISO - something went wrong
- Having examined the other thread , you still did not provide any logs. It is impossible to advise further if you do not share pertinent information
- The (b) and (c) steps outlined in comment #7 is what needs to happen

Good luck with your troubleshooting

PS reducing your custom cloud-init to something very simple may be a good next step. A single identifiable change.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Let me take a look at re applying that config, it's possible that things didn't get applied. Is there a difference between adding the iso image manually vs the "add cloudinit image" option in the gui?