[rhos-list] cloud-init configuration for ssh access

Perry Myers pmyers at redhat.com
Fri Nov 1 11:58:08 UTC 2013


On 10/31/2013 04:49 PM, David Raddatz wrote:
> A quick post-mortem on this issue and I wanted to share what we learned (or "I" learned anyway) in case it avoids problems for others...
> 
> While I was apparently following the docs by "just install cloud-init on your VM image", while working with Lars we discovered if you reboot your image after installing cloud-init, it will create some files/directories in /var/lib/cloud which will then prevent the instance from allowing ssh to work (my Permission denied issue I was seeing).
> 
> For example, doing the following:
> - create VM and install RHEL 6.4 and set up with other files/software
> - install/configure cloud-init on VM
> - reboot VM (just to make sure it still boots)
> - shutdown VM
> - run virt-sysprep on image (per recommendation in docs)
> - upload to glance and launch instance using the defined keypair
> - trying to use ssh -i with the same keypair results in Permission denied
> 
> Whereas, doing the following:
> - create VM and install RHEL 6.4 and set up with other files/software
> - install/configure cloud-init on VM
> - shutdown VM
> - run virt-sysprep on image (per recommendation in docs)
> - upload to glance and launch instance using the defined keypair
> - trying to use ssh -i with the same keypair Works! No password prompt (as expected)
> 
> Not rebooting the VM allowed the ssh to work as the /var/lib/cloud directory was empty when it was shutdown.
> 
> Not sure if this is a doc issue (to warn people NOT to reboot the VM after cloud-init installation/configuration) or a bug (which Lars was going to investigate a little) but thought it was worth a quick email to warn folks about.
> 
> Thanks again to Lars for his assistance on this,

Interesting.  Lars/Steve, is this a bug or just a docs issue do you think?

Perry




More information about the rhos-list mailing list