Errors from build azure image

171 views
Skip to first unread message

Rajinder Singh

unread,
Aug 3, 2016, 11:57:15 PM8/3/16
to Packer
I am trying to build a ubuntu VHD in azure using packer.

I took an existing sample.


I created a service principle using these instructions.


I have create service principle many times before.

I updated above template and set the values for 

    "client_id": "xxxx",
    "client_secret": "gggg",
    "resource_group_name": "group name",
    "storage_account": "stgacctname",
    "subscription_id": "xxx",
    "tenant_id": "brrrr",

    "capture_container_name": "images",
    "capture_name_prefix": "packer",


Build 'azure-arm' errored: autorest#WithErrorUnlessStatusCode: POST https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxx/oauth2/token?api-version=1.0 failed with 400 Bad Request: StatusCode=400


I need to find a fix this this issue ASAP. Seems like an authentication failure but I don't know why.

I have used Packer with AWS for a while and it has worked well.

I recommended Packer to a client for Azure and I am surprised to see that even my simple example does not work.


appreciate any tips or suggestions.


Thanks

Message has been deleted

Alvaro Miranda Aguilera

unread,
Aug 4, 2016, 2:38:28 AM8/4/16
to packe...@googlegroups.com
Hello,

Have you done all the steps that are shown here?

Thanks
Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/e6c9be43-9fe1-4165-b42f-1671daf1ae75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Message has been deleted

Daryl Porter

unread,
Aug 22, 2016, 10:14:55 AM8/22/16
to Packer
Did you ever get this resolved?

Having the same issue myself and have gone through all the links mentioned here.

Thanks,
Daryl

Rajinder Singh

unread,
Aug 23, 2016, 11:32:42 PM8/23/16
to Packer
Daryl,

I found a work around that met for short term needs.

By removing client_id, tenant_id and client_secret. Packer will then ask you to login interactively. Once you authenticate via web browser packer will be able to build image.


Reason the guided setup script broke is because azure cli changed the syntax for the create ad  sp  command.

ritwij....@citrix.com

unread,
Dec 19, 2016, 10:42:43 AM12/19/16
to Packer
Hi Rajinder,

Do you have any sample working packer template for azure ? I've had a hard time building a custom image. It says waiting for ssh and never succeed, while ssh is available in parallel.

Thanks,
Ritwij
Reply all
Reply to author
Forward
0 new messages