Trouble using cicustom user=,network=

Rina-Y

New Member
May 19, 2020
3
0
1
43
Hi! I have been pushed to using cloud-init to automate the building of new machines due to ubuntu 20.04 no longer supporting debian-installer. Since I had to use cloud-init anyway, I was hoping to push some defaults into the vm's, since I am doing this all with ansible.

The way I am set up currently, is to make sure I have an up-to-date could install, then use qemu-img to make a snapshot of that disk at the proper size according to the settings in ansible. I then follow all the steps in the tutorial on using cloudinit in the proxmox wiki, except for making the template. I didn't really want to do that step, since ansible would be building the machines I need and if I did use a template, they would be full copy clones, which would just cause an additional machine to be on the server that was not needed.

As it is right now, when I use --cicustom, I get no errors on loading the files from the snippets area but when i do a "qm cloudinit dump" it doesn't show the information in the yaml files I linked to. This is more than a little frustrating. Anyone have any guidance about this?
 
qm cloudinit dump is used to print the autogenerated config, not the custom one you specify via --cicustom. The ones you set in --cicustom will be passed as is to the cloudinit iso, completely replacing the generated one.
 
Oh okay. Well, the machines were not taking the custom information either. The hostname and users were not being installed and i couldn't access with ssh like I should have been able to. At this point I bypassed it and made my own cloudinit image with cloud-localds (i took the meta from the qm cloudinit dump before replacing the cdrom drive with the iso i made with the normal utilities).
 
EDIT: File has to have .yml extension, not .yaml. It's working fine with .yml

I have the same problem that Ubuntu 20.04 dosn't apply my custom cicustom user YAML configuration. I've already set local storage content to snippets.

Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,snippets
        maxfiles 0
        shared 0

qm set 140 --cicustom user=local:snippets/userconfig.yaml

# dir /var/lib/vz/snippets/userconfig.yaml
-rw-r--r-- 1 root root 1.3K May 24 12:34 /var/lib/vz/snippets/userconfig.yaml

I'm using ZFS volumes.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!