I was working on my AZ-104 certification, when I came across an issue running the commands in the reference. I was using Azure CLI to set up a VM in Azure and ran into this error:

ERROR: Extra data: line 1 column 4 (char 3)

After trying several things, I decided to try and search the Internet. What I found out is covered in this bug report. The fix is to use an explicit URN for the OS image installed. Going deeper into the linked reports, what happened to make the alias not work?

 think this is related to the vm_image_alias_doc setting. It’s currently set to https://azcliprod.blob.core.windows.net/cli/vm/aliases.json which 404s for me. A colleague has an older azure cli version which uses https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json and that still works.

I set it to the old URL manually and it is a good workaround for now
az cloud update -n AzureCloud --endpoint-vm-image-alias-doc https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json

There’s a relationship map that was stored on Github, and the URL changed. I have seen people say this broke their production deployments when searching for this error.

What does it mean in the long run? It means that the contents of Github is more significant than just the distribution of source code. It is being used as a meta data store for basic Azure CLI functionality. Azure CLI is not a third party utility, it is Microsoft built and maintained and is used in their certifications, and that short of it being some form of shadow IT is using practices endorsed by Microsoft themselves. The next question is “to what extent is Github serving as a metadata store for Microsoft or other enterprise Products?” To be fair, Microsoft isn’t unique in this regard. It is certainly possible to do something like put a black list up on Github, then integrate that into say a Firewall as a block list.

The reason why this is noteworthy is that Github themselves have been having some reliability problems and Github its self getting merged into Microsoft’s CoreAI team. If there are dependencies around Github and Azure, it could potentially lead to issues that aren’t particularly clear happening down the road.

By utadmin

Leave a Reply

Your email address will not be published. Required fields are marked *