Lxc profiles to set user.network-config and user.user-data with cloud init cloud-config

lxc profiles to set user.network-config and user.user-data with cloud init cloud-config:

Hi i’m hoping somebody could help, i’m having trouble getting both user.data and user.network to both work at the same time, weather in two separate profiles or the same profile ran at the same time, however both work fully when only adding one user.### | individually at launch with -p profile-name but not together even if added to just the one profile at the same time the user. network always works but the user.date only adds user sudo ssh keys but on update’s, upgrade’s, package’s nor runcmds unless ran without user.network config.

All of the yaml data is getting to the cloud-init config in the container every method i used above when checked with the command below.
sudo cloud-init query userdata

Screenshot from 2020-08-26 00-04-57

Screenshot from 2020-08-26 00-05-10

I’m aware there’s are command line methods to change to a static ip but id really like to do with profiles and cloud init if somebody can help idd be very grateful or is adding both cloud configs at the containers launch just impossible.

Ben, :slight_smile:

Can you show the entirety of lxc profile show NAME for your profile?

Often this ends up being some kind of mis-indent or something causing confusion.
That or it’s cloud-init failing on one of the two keys.

You may want to take a look at the files in /var/lib/cloud/seed/ to make sure that your user-data and network-config both made it there properly.
Then look at the cloud-init log files in /var/log to see what may be going on.

Thanks so much /var/log/cloud-init-output.log was a great help.

Am sorry to say it was a typo and my late night persistence got in the way of clarity,

thanks for response was not wasted your help is alway insightful and of great use for the future.

Thanks again,
Ben.