[SOLVED] Custom Cloud-innit file backup issues

juronja

New Member
May 8, 2025
6
0
1
Maribor, Slovenia
Hey folks.

So I made myself a custom cloud-init file, because the UI cloud-init is limited. Actually, each time I create a VM I run a script to customize a final cloud-init file (so each VM can be different). I save the file to /var/lib/vz/snippets/ubuntu-homelab-cloud-init.yml. (so far I am just overwriting, no unique files per VMID)

When backuping and restoring the VM on another node it fails because the file reference is lost (Although expected, I haven't thought of that).

How could I be able to make a custom cloud-init on VM create and make it self-contained inside VM so it will be backuped?
If using UI for cloud-init the configs get transfered just fine, so is there a default cloud-init file/config being created when using UI, so I could overwrite that?

Not sure how to approach this the best way. The only thing I can think of is saving unique VMID cloud-innit files, and transferring them too before restore.
Thank you for any ideas!
 
Last edited:
Hi @juronja ,

When you are using built-in options for CI, they are saved into VM config file which is located on the special clustered file system https://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)

When you are saving the file to a local folder of the node - it stays there. You can enhance your script to copy/scp the resulting files to all nodes.

You cannot overwrite the "default" file because it does not exist until PVE does CI generation for one reason or the other.

Cheers



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