shearichard
shearichard

Reputation: 1105

Make AMI from EC2 W2008 instance - why never get a password?

What I'm trying to do

I'm trying to clone a EC2 Windows 2008 instance via the Managment Console.

The instance is based upon "Windows-Server2008-i386-Base-v104 (ami-92ba43fb)" but has a number of applications installed on it that I would like to preserve for new instances.

What's Happening

I've now created two different AMI's and on both occasions when I launch instances using the resulting AMI I'm unable to retrieve the password via the 'Connect' option of the EC2 Management Console (I keep getting the "Password generation and encryption can sometimes take more than 30 minutes" message even more than 30 minutes after the launch).

My Question

When using "Create Image (EBS/AMI)" from within the EC2 Management Console what state should the instance you're trying to base the AMI upon ? Is it OK if the instance is running ? I've read elsewhere that you should "stop all services". That comment refers to a *nix environment - what should be done when clonging a Windows Instance ?

Is there anything else about this process that might result in an AMI that would launch but stop me being unable to retrieve the password ?

In Closing

I've read (comment written by eSniff) that the passwords of instances launched from cloned AMI's share the same password as the originating instance. This sounds logical but I tried this approach and as far as I can see that isn't true. I'd be interested to hear from people who think it is.

Upvotes: 3

Views: 1719

Answers (1)

Nikhil Dabas
Nikhil Dabas

Reputation: 2393

You need to use the Ec2ConfigService Settings tool to enable generation of a new password on the next reboot (which would be when the AMI gets instantiated.)

You'll have this tool in your Start menu. Check the box that says 'Set a random password on next boot' and then bundle up the image.

Some older versions of the tool did not have this feature, if I remember correctly; you can get the latest version of the Ec2Config service from http://s3.amazonaws.com/ec2-windows-downloads/EC2Install.zip (according to http://aws.amazon.com/articles/1767)

Upvotes: 1

Related Questions