Rancheros PXE boot cloud-config.yml not executed

Hi all,

I’m new to rancherOS, and trying to build a production grade environment.

I’m booting VM images on our Proxmox clusters and using PXE boot to boot rancher.

label DevNet-3
kernel rancherOS/vmlinuz printk.devkmsg=on rancher.password=rancher rancher.cloud_init.datasources=[‘url:http://192.168.32.1/rancheros/cloud-config.yml’]
append initrd=rancherOS/initrd

This does boot the VM just fine, and I can see that Rancher does pull the cloud-config.yml file, however it’s not executed. The default password is set to rancher, but the SSH-Key I’ve put in the cloud-config is not set.

If I run the same cloud-config.yml file using ros install -c cloud-config.yml -d /dev/sda then all works great.

Any help to debug/fix this would be great.

Thanks

–Guy

We’ve ran in to the same issue. It seems you must use iPXE and not pxe för rancher to pick up the kernel parameters.

We use foreman and use PXE to chain into iPXE and now it works!

Check the first line of your cloud-config file… it must have:

#cloud-config

As soon as I put that at the top of the file it started to work. I also found that if you have an error in the cloud-config file… eg wrong number of spaces then it’s hit or miss as to what gets set and not.

I keep meaning to build a cloud-config validator which I’ll run out of gitlab CI.