Cloud-init problem

Klesti

New Member
Nov 8, 2023
5
0
1
cloud-init config template is ignored when we start the new instance

r/Proxmox - Proxmox Cloud-init !!problem!!
metadata



r/Proxmox - Proxmox Cloud-init !!problem!!
usrdata

qm set 101 --cicustom "user=local:snippets/101-userdata.yml,meta=local:snippets/101-metadata.yml"


also problems with OpenSuse Leap and no support for .qcow2 images
 
cloud-init config template is ignored when we start the new instance
Can you expand on this? What troubleshooting if any have you done on/after boot? Do you see the ISO generated? Does it contain correct files?
What is the configuration of the VM? ie "qm config [vmid]"


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: Klesti
root@pve:~# qm config 101
agent: 1
boot: order=scsi0
cicustom: user=local:snippets/101-userdata.yml,network=local:snippets/101-networkdata.yml
cores: 2
cpu: x86-64-v2-AES
ide2: zfs:vm-101-cloudinit,media=cdrom
memory: 2048
meta: creation-qemu=8.0.2,ctime=1699468881
name: test-ci
net0: virtio=DE:03:B1:70:5B:C9,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-101-disk-0,size=2252M
scsihw: virtio-scsi-single
smbios1: uuid=4c91963a-b2b7-4161-86aa-1a56e3025b77
sockets: 1
vmgenid: c45cd353-f9c2-44e2-a0d9-4604c1b4546d
root@pve:~#
 
after the cloudinit disk mount qm set 101 --ide2 zfs:cloudinit i start the vm and the vm just starts normally ignoring the ci configs
after boot im not able to access the vm since my ssh keys where not added into the server and idk where the logs of Poxmox are for this case
 
Last edited:
your screenshots have yaml extension
your config has yml extension
the metadata is not referenced at all
network was not presented/discussed originally

I recommend going back and carefully examining everything... Triple and quadruple checking.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
oh my mistake on yaml i modified them while testing the last screenshot was made after Im still testing it
 
if u have any template or guide for this plz can u share it so i can follow and see what i did wrong
 
oh my mistake on yaml i modified them while testing the last screenshot was made after Im still testing it
If in your decription of the issue you supply wrong/outdated data - it makes it very hard to give any suggestions..

We use cloud-init daily on hundreds of VMs that are constantly added and removed. Many hundreds if not thousands of users do so as well around the world. It works.

Your config files seem ok, but its hard to judge based on screenshot. Have you run them through https://www.yamllint.com/ ?

Are you sure your OS is properly configured to use cloudinit? Does it have proper packages installed? Are they in correct state?

Have you tried to use built-in cloud-init ?

Have you tried one of the industry standard Cloud images, ie Ubuntu or Centos? Try them with built-in system. Then try your custom config files.

Reduce complexity of your custom file to a minimum, examine the log after boot, ie /var/log/cloud-init.log and /var/log/cloud-init-output.log

Good luck.


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

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!