In LXD I am customizing one of the Ubuntu upstream images and the using lxc publish to convert that to an image again. How can I prime the image again in order for cloud-init to run?
The goal is to apply the name of the container, generate fresh SSH keys for the sshd and so on, whenever I init or launch based on my customized image …
Also, can the priming at all be done after lxc publish or is that something that should be done on the stopped container before the lxc publish step?
Thanks!
NB: I already saw this article by @simos as well as this question and neither touch on the topic of resetting or priming again the cloud-init of a container that was started at least once.