Machine: The image id '[ami-a00461c8]' does not exist

Created on 15 Jan 2015  Â·  11Comments  Â·  Source: docker/machine

Follow up on #283
Commit 7efdb5a0ca5fe43a6f52851827140de4dff36ccb

The default AMI cannot be used eu-central-1 or eu-west-1 in apparently.

$ machine create -d amazonec2 --amazonec2-access-key=$ACCESS_KEY --amazonec2-secret-key=$SECRET_KEY --amazonec2-vpc-id=$VPC_ID --amazonec2-region=eu-central-1 dockerbox
INFO[0000] Launching instance...
ERRO[0001] Error creating host: Error launching instance: Problem with AWS API call: Non-200 API response: code=400 message=The image id '[ami-a00461c8]' does not exist

WARN[0001] Removing created machine. You can run machine with the --debug flag to avoid this.
WARN[0001] You will want to check the provider to make sure the machine and associated resources were properly removed.
FATA[0001] Error creating machine

Using the standard amazon linux AMI fails too. The instance runs and then stops for a unknown reason. (Launching one in the AWS console works just fine)

But anyway, the ssh command from machine will never succeed. The default login user for that AMI is ec2-user and not ubuntu.

 machine create -d amazonec2 --amazonec2-access-key=$ACCESS_KEY --amazonec2-secret-key=$SECRET_KEY --amazonec2-vpc-id=$VPC_ID --amazonec2-region=eu-central-1 --amazonec2-ami="ami-b43503a9" testbox --debug
INFO[0000] Launching instance...
DEBU[0000] executing: /usr/bin/ssh-keygen ssh-keygen -t rsa -N  -f /Users/orobert/.docker/machines/testbox/id_rsa

Generating public/private rsa key pair.
Your identification has been saved in /Users/orobert/.docker/machines/testbox/id_rsa.
Your public key has been saved in /Users/orobert/.docker/machines/testbox/id_rsa.pub.
The key fingerprint is:
26:8d:b2:ee:b6:12:3a:9e:1a:f6:72:cf:32:cc:0d:08 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|E      o         |
|. . . o S        |
| ... o o         |
|.oo.+            |
|+o+Bo.           |
|++o=B+           |
+-----------------+
DEBU[0000] creating key pair: testbox
DEBU[0000] creating security group in vpc-4d876924
DEBU[0000] authorizing 0.0.0.0/0
DEBU[0001] launching instance in subnet subnet-71ac5818
DEBU[0024] created instance ID i-37daa4f9, IP address 54.93.62.192
INFO[0024] Waiting for SSH on 54.93.62.192:22
DEBU[0166] Settings tags for instance
DEBU[0166] Setting hostname: testbox
DEBU[0166] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 22 -i /Users/orobert/.docker/machines/testbox/id_rsa [email protected] echo "127.0.0.1 testbox" | sudo tee -a /etc/hosts && sudo hostname testbox && echo "testbox" | sudo tee /etc/hostname
ERRO[0167] Error creating host: exit status 255
WARN[0167] Removing created machine. You can run machine with the --debug flag to avoid this.
WARN[0167] You will want to check the provider to make sure the machine and associated resources were properly removed.
FATA[0167] Error creating machine
driveec2 kinbug

Most helpful comment

Yes Simon is correct, the default AMI is intended for use in the default
region (us-east-1). I think we could do what Simon said and keep a list of
what AMIs are intended for use in the other regions and switch based upon
region selection. For now you can use the following:

ap-northeast-1 ami-50eaed51
ap-southeast-1 ami-f95875ab
eu-central-1 ami-ac1524b1
eu-west-1 ami-823686f5
sa-east-1 ami-c770c1da
us-east-1 ami-4ae27e22
us-west-1 ami-d1180894
cn-north-1 ami-fe7ae8c7
us-gov-west-1 ami-cf5630ec
ap-southeast-2 ami-890b62b3
us-west-2 ami-898dd9b9

On Thu, Jan 15, 2015 at 5:27 PM, Simon Thulbourn [email protected]
wrote:

AMIs only exist in one region, the default one only exists in us-east-1.

The docs should specify. Or machine should keep a list.

—
Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/287#issuecomment-70174570.

All 11 comments

AMIs only exist in one region, the default one only exists in us-east-1.

The docs should specify. Or machine should keep a list.

Yes Simon is correct, the default AMI is intended for use in the default
region (us-east-1). I think we could do what Simon said and keep a list of
what AMIs are intended for use in the other regions and switch based upon
region selection. For now you can use the following:

ap-northeast-1 ami-50eaed51
ap-southeast-1 ami-f95875ab
eu-central-1 ami-ac1524b1
eu-west-1 ami-823686f5
sa-east-1 ami-c770c1da
us-east-1 ami-4ae27e22
us-west-1 ami-d1180894
cn-north-1 ami-fe7ae8c7
us-gov-west-1 ami-cf5630ec
ap-southeast-2 ami-890b62b3
us-west-2 ami-898dd9b9

On Thu, Jan 15, 2015 at 5:27 PM, Simon Thulbourn [email protected]
wrote:

AMIs only exist in one region, the default one only exists in us-east-1.

The docs should specify. Or machine should keep a list.

—
Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/287#issuecomment-70174570.

I'll encapsulate this into my work with stripe/AWS-go

@sthulb thanks!

@ehazlett thanks!

I've covered this in #290

@sthulb Do you think we could pull that out and use it now? I would like to get this fixed without having to replace the entire lib. We will almost definitely switch to that eventually but I think having this fix now would be tremendously beneficial to those not using us-east-1 by default.

Sure. I can submit a different PR containing just that :)

@sthulb awesome thanks!

@sthulb @ehazlett Great, thanks!

Closing - #400 merged

Was this page helpful?
0 / 5 - 0 ratings