Packer build Issue

Hi Team,

This is for Azure image build, when I’m running the packer build I’m getting the below error:

I have tried checking the subscription ID and it looks fine. Please help me what could be the issue.

[1;32m==> azure-arm: Running builder …e[0m
e[1;31mBuild ‘azure-arm’ errored after 1 millisecond 814 microseconds: error fetching subscriptionID from VM metadata service for Managed Identity authentication: unexpected end of JSON inpute[0m

==> Wait completed after 1 millisecond 863 microseconds

==> Some builds didn’t complete successfully and had errors:
→ azure-arm: error fetching subscriptionID from VM metadata service for Managed Identity authentication: unexpected end of JSON input

==> Builds finished but no artifacts were created.

Hi,

Can someone help me on this error.

I have tried checking the azure role as well it has vm contributor role as well. But still this error persist.