Azure-cli: az vm stop in the CLI stops the VM but Stop in the portal deallocates the resources. need parity between the two?

Created on 27 Apr 2017  路  6Comments  路  Source: Azure/azure-cli

Description

Outline the issue here:

az vm stop in the CLI stops the VM but does not deallocate the resources. The customer continues to get charged for the resources. Stop in the portal though deallocates the resources. I think we should have parity between the 2.

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here:pip

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here:dev build

OS Version: What OS and version are you using?
Answer here:MACOS

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here:terminal

Compute Discussion

Most helpful comment

@sauryadas there is the cmd az vm deallocate to mimic the portal version of "stop". It seems CLI properly has 2 separate commands appropriately named and portal is overloading the term "stop" incorrectly.

I think we should get Vlad to update buttons for "stop" and "stop-deallocate".

All 6 comments

I would like to register my support for this, since I just got bitten by this awkward distinction as well. Fortunately I didn't waste _that much_ money.

@sauryadas there is the cmd az vm deallocate to mimic the portal version of "stop". It seems CLI properly has 2 separate commands appropriately named and portal is overloading the term "stop" incorrectly.

I think we should get Vlad to update buttons for "stop" and "stop-deallocate".

I'd like to vote for this request. Azure portal, Powershell and CLI need follow the same design rule so that end users won't get lost.

Also just gotten bitten by this after I saw my bill, "Stop" in the Portal and Powershell (by default) means deallocation and there should be parity between the methods of resource management.

I think it's a valid assumption to make that someone using "az stop" intends to deallocate the virtual machine rather than just shutdown the guest operating system. Especially if they're used to Azure anyway (which you can also assume they are if they're using the Az CLI over the Portal).

My suggestion is to either - rename "stop" to "Power-Off" in line with the Azure Compute Rest API here and keep the behaviour of az vm deallocate so that it is clear that you are just powering off the guest OS and the VM is yet to be deallocated or change az vm stop to be similar with the Portal/Powershell and completely deallocate the machine, which might mean getting rid of Az VM deallocate altogether.

What about documentation? It needs update too.

The help for the CLI was updated as part of the merged PR above. The changes in that PR will be reflected in the next release of the CLI (January 15). The online documentation will be updated around the release as well.

Was this page helpful?
0 / 5 - 0 ratings