I'm trying to configure cloud-init with custom data, both for user-data and meta-data. I'm aware that I can set custom data with
If I do that, and then try and look at what's set using
my custom settings don't show up.
_But_ if I mount the cloud init volume (which Proxmox wants to only allow me to do read-only) and examine the files within, I can see my custom user config within /mount-path/user-data (for example). And booting an instance from that cloud-init disk does seem to do what I want and run my custom user config.
But _then_, if I delete the source file from local:snippets/..., or if I migrate the VM to another instance (the cloud-init volume itself is on Ceph), it stops working.
That would suggest that all that actually ends up in the volume is some kind of reference to the snippet file, but if that were the case I'd expect to see a symlink or similar in the mounted drive, instead of the actual file content.
So how is all of this set up? Is there any way I can generate a cloud-init volume with custom content and not have to retain the files that make that volume up to be able to continue to use it? Also, can I generate my own volume to use as the cloud-init volume and point qemu at it, or do I have to use the one Proxmox creates for me?
Code:
qm set <ID> --cicustom ...
If I do that, and then try and look at what's set using
Code:
qm cloudinit dump
my custom settings don't show up.
_But_ if I mount the cloud init volume (which Proxmox wants to only allow me to do read-only) and examine the files within, I can see my custom user config within /mount-path/user-data (for example). And booting an instance from that cloud-init disk does seem to do what I want and run my custom user config.
But _then_, if I delete the source file from local:snippets/..., or if I migrate the VM to another instance (the cloud-init volume itself is on Ceph), it stops working.
That would suggest that all that actually ends up in the volume is some kind of reference to the snippet file, but if that were the case I'd expect to see a symlink or similar in the mounted drive, instead of the actual file content.
So how is all of this set up? Is there any way I can generate a cloud-init volume with custom content and not have to retain the files that make that volume up to be able to continue to use it? Also, can I generate my own volume to use as the cloud-init volume and point qemu at it, or do I have to use the one Proxmox creates for me?