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

David Raddatz draddatz at sgi.com
Thu Oct 31 20:49:37 UTC 2013


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,
Dave

> -----Original Message-----
> From: Lars Kellogg-Stedman [mailto:lars at redhat.com]
> Sent: Friday, October 18, 2013 3:58 PM
> To: David Raddatz
> Cc: rhos-list at redhat.com
> Subject: Re: cloud-init configuration for ssh access
> 
> On Fri, Oct 18, 2013 at 08:47:39PM +0000, David Raddatz wrote:
> > I get this for both users (root and cloud-tester).  What am I missing?
> 
> I don't know.  What are you doing? :)
> 
> If you could post your cloud.cfg somewhere I'd be happy to take a look at it.
> 
> --
> Lars Kellogg-Stedman <lars at redhat.com>





More information about the rhos-list mailing list