Issue with Creating Azure Resource Manager

905 views
Skip to first unread message

Jeya Kumar

unread,
Oct 26, 2017, 1:27:01 PM10/26/17
to Packer
Hi,

I am trying to create azure images getting the following error. Not able to find any clue on this.



azure-arm output will be in this color.

==> azure-arm: Running builder ...
    azure-arm: Creating Azure Resource Manager (ARM) client ...
Build 'azure-arm' errored: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/44cae533-4247-4093-42cf-897ded6e7823/resourceGroups/packerdemo/providers/Microsoft.St
orage/storageAccounts/virtualmachines/listKeys?api-version=2016-12-01: StatusCode=0 -- Original Error: adal: Refresh request failed. Status Code = '400'

==> Some builds didn't complete successfully and had errors:
--> azure-arm: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/44cae533-4247-4093-42cf-897ded6e7823/resourceGroups/packerdemo/providers/Microsoft.Storage/storag
eAccounts/virtualmachines/listKeys?api-version=2016-12-01: StatusCode=0 -- Original Error: adal: Refresh request failed. Status Code = '400'

==> Builds finished but no artifacts were created.


Did I miss anything in the config? 

Thanks in advance.

Thanks,
Jeya

Jack Fruh

unread,
Nov 27, 2017, 11:06:30 AM11/27/17
to Packer
I have the same problem, did you find a solution?

Milan

unread,
Nov 30, 2017, 12:34:02 PM11/30/17
to Packer
Make sure the VSwitch is connected and the VM is getting /assigned the IP address . Once the VM is able to get the IP,then Packer will connect to the VM and does the post config. Hope this resolves the issue

Radosław Skowera

unread,
Dec 14, 2017, 3:29:29 AM12/14/17
to packe...@googlegroups.com
Hi guys,

this issue is getting interesting, right now I am getting similar output as @Jeya:


==> Some builds didn't complete successfully and had errors:
--> azure-arm: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/XXYY_SUB_ID/resourceGroups/resource-westeurope/providers/Microsoft.Storage/storageAccounts/storage/listKeys?api-version=2016-12-01: StatusCode=0 -- Original Error: adal: Refresh request failed. Status Code = '401'

but as you can see, I am receiving 401 code. What is more to this unwanted behaviour is that, I was able to run packer build without issues, before this one, that fails.
I've downgraded packer to ver. 1.0.1 from 1.0.3, with the same result, Packer cache at ~/.packer were cleaned up too,  also I've tried to make build today, without any progress. I am getting 401 code since yesterday.
I am wondering if this issue is related to Packer or it should be addressed to changes on Azure (ADAL) side.

Best,
Radek



--
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/6a5622b6-c425-49f8-b456-ab15c6ca818e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alvaro Miranda Aguilera

unread,
Dec 14, 2017, 4:49:05 AM12/14/17
to packe...@googlegroups.com
can you setup a github repo and instruction how to repro?

Thanks
Alvaro


For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages