Cloud-init does not support this functionality..... :( I have spoken with some people from their community; basically, the same script that sets up host SSH keys is also the one that sets up user SSH keys. That is why this script is configured to run only once per instance. Also, even if we split this script into two, we have the problem of metadata cache that they do (for some reason they do not want to rely on the metadata provider). So, even if we ran the script twice, it would only apply the same key over and over again.
What about a hacking during this ApacheCon to fix this !? On Thu, Apr 13, 2017 at 4:10 PM, Nux! <[email protected]> wrote: > Rafael, > > Let me know if I can do something to improve this on the template side. > > > Lucian > > -- > Sent from the Delta quadrant using Borg technology! > > Nux! > www.nux.ro > > ----- Original Message ----- > > From: "Rafael Weingärtner" <[email protected]> > > To: "users" <[email protected]> > > Sent: Friday, 7 April, 2017 22:48:44 > > Subject: Reset ssh keys not working with cloud-init. > > > Hi folks, > > I am using the Ubuntu template available at http://dl.openvm.eu/ > cloudstack/, > > > > I create an ssh key using ACS API, and then when I instantiated the VM, I > > configured ACS to use the previously created VM. Everything worked. > > However, when I created another key and used the API method > > “resetSSHKeyForVirtualMachine”, the key was not changed in the VM. Has > > someone used this feature before with cloud-init? So, I can get some > > information to check if I should start debugging ACS side or cloud-init > > side first. > > > > -- > > Rafael Weingärtner > -- Rafael Weingärtner
