Azure-Cli 0.10.9 bug – time to downgrade

In the past I posted an article which describes how you can install the Azure-Cli to your Linux machine. Then I had created some bash scripts and I used the advantages of this kind of Azure management. And on 3rd of February in 2017 the latest version arrived. This is the 0.10.9.

I was happy and I started to upgrade from 0.10.8 to 0.10.9. (with this simple command: npm upgrade -g azure-cli


) Then I realized that something went wrong with my scripts.


When I executed a simple VM related command

azure vm list

I was facing the following error message:

info:    Executing command vm list
+ Getting virtual machines
error:   The resource type ‘virtualMachines’ could not be found in the namespace ‘Microsoft.Compute’ for api version ‘2016-04-30-preview’. The supported api-versions are ‘2015-05-01-preview,2015-06-15,2016-03-30’.
error:   Error information has been recorded to /root/.azure/azure.err
error:   vm list command failed


Therefore I started an investigation on the affected servers and the working servers as well. I read some articles on the Internet and GitHub and I asked MS regarding the issue but nothing real aid was received. Afterwards I thought the Node.Js upgrade caused the issue so I downgraded it but this did not bring the required result. Finally I tested on some machines with different scenarios and I found the relation between Azure-Cli version and the behavior of scripts. Here is the result.

Azure CLI Node.JS OS Result
0.10.8 7.4.0 RHEL 7.3 OK
0.10.9 7.4.0 CENTOS 7 ERROR
0.10.9 7.5.0 RHEL 7.3 ERROR
0.10.9 4.7.0 Windows Server 2016 ERROR
0.10.8 4.7.0 Windows Server 2016 OK

From here I knew what was the root cause of the issue – the Azure Cli upgrade. Additionally I found an issue on GitHub which is same than this. (bug when ‘vm list ‘ in mode arm) From now we should say that It’s OK I am waiting for the fix, shouldn’t we. No, because we have SLAs and deadlines and services and we must find at least a workaround until the final fix. 🙂

Therefore I have decided I downgrade Azure-Cli on the affected Linux servers from 0.10.9 to 0.10.8. For this you need to follow merely the next steps and execute the commands:

#Get current version of Azure-Cli:
azure --version
#(Result: 0.10.9 (node: 7.5.0))

#Uninstall Azure-Cli 0.10.9: 
npm uninstall -g azure-cli

#Clear NPM cache: 
npm cache clear -g

#Download 0.10.8 from GitHub: 
wget -N

#Install 0.10.8 with NPM: 
npm install -g azure-cli.0.10.8.tar.gz

#Get current version of Azure-Cli:
azure --version 
#(Result: 0.10.8 (node: 7.5.0))

Now, test the VM related commands and you will realize they work again:

azure vm list



Comment: On Windows the workaround is a little bit easier because you merely have to

  1. uninstall 0.10.9
  2. then download 0.10.8 from GitHub
  3. finally install it to your Windows Server


I hope this article helps you to keep your SLAs. 🙂

Be the first to comment on "Azure-Cli 0.10.9 bug – time to downgrade"

Leave a comment

Show share buttons
Hide share buttons
Positive SSL