Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialising instance on AWS with no keypair getting API error #2754

Closed
m1keil opened this issue Sep 18, 2015 · 4 comments
Closed

Initialising instance on AWS with no keypair getting API error #2754

m1keil opened this issue Sep 18, 2015 · 4 comments

Comments

@m1keil
Copy link

m1keil commented Sep 18, 2015

I'm trying to start an instance in AWS with no ssh_keypair_name but with ssh_key_path defined.
(The scenario is that the AMI already has a pre-embedded key pair which is not part of the aws keystore).

Getting this:

Running Packer..
1442589607,,ui,say,nightly_virtualbox_build output will be in this color.
1442589607,,ui,say,
1442589607,,ui,say,==> nightly_virtualbox_build: Prevalidating AMI Name...
1442589608,,ui,say,==> nightly_virtualbox_build: Inspecting the source AMI...
1442589608,,ui,say,==> nightly_virtualbox_build: Creating temporary security group for this instance...
1442589609,,ui,say,==> nightly_virtualbox_build: Authorizing access to port 22 the temporary security group...
1442589609,,ui,say,==> nightly_virtualbox_build: Launching a source AWS instance...
1442589610,,ui,error,==> nightly_virtualbox_build: Error launching source instance: InvalidParameterValue: Invalid value '' for keyPairNames. It should not be blank\n==> nightly_virtualbox_build:     status code: 400%!(PACKER_COMMA) request id: []
1442589610,,ui,say,==> nightly_virtualbox_build: No AMIs to cleanup
1442589610,,ui,say,==> nightly_virtualbox_build: Deleting temporary security group...
1442589610,,ui,error,Build 'nightly_virtualbox_build' errored: Error launching source instance: InvalidParameterValue: Invalid value '' for keyPairNames. It should not be blank\n  status code: 400%!(PACKER_COMMA) request id: []
1442589610,,error-count,1
1442589610,,ui,error,\n==> Some builds didn't complete successfully and had errors:
1442589610,nightly_virtualbox_build,error,Error launching source instance: InvalidParameterValue: Invalid value '' for keyPairNames. It should not be blank\n   status code: 400%!(PACKER_COMMA) request id: []
1442589610,,ui,error,--> nightly_virtualbox_build: Error launching source instance: InvalidParameterValue: Invalid value '' for keyPairNames. It should not be blank\n  status code: 400%!(PACKER_COMMA) request id: []
1442589610,,ui,say,\n==> Builds finished but no artifacts were created.

This started in 0.8.x branch. Works in 0.7.x without any problem.
This is similar to #2440

@jantman
Copy link

jantman commented Oct 6, 2015

I'm having this issue as well. I have ssh_username and ssh_private_key_file set in the builder config.

@dave2
Copy link
Contributor

dave2 commented Nov 16, 2015

Also getting this. The user being used inside the AMI to perform provisioning is already created with an authorized pubkey (and the AMI will not accept the externally-defined key anyway).

(Adding ssh_keypair_name with a key that exists fixes the problem. It still seems to use my keypair internally defined).

@cbednarski
Copy link
Contributor

Thanks for the report. I think this is a duplicate of #2301

@m1keil
Copy link
Author

m1keil commented Feb 6, 2016

Yep. Sorry about that, couldn't find anything similar when I opened it but it seems like it is in fact a duplicate. I'll close this one.

@m1keil m1keil closed this as completed Feb 6, 2016
@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants