Azure-cli: Allow users to force-stop a VM

Created on 1 Aug 2017  路  8Comments  路  Source: Azure/azure-cli

User reporting an issue where it can take a long time for an unresponsive VM to stop, and would prefer a method to "kill a VM WITH EXTREME PRJUDICE."

An idea, add an param to force-stop after 30 seconds of stopping

$ az vm stop --force-after 30聽 
Compute

Most helpful comment

When a VM is non responsing you do not have the possibilty to log in via SSH. We need something like all VM providers have: Reset the VM and boot in again.
I just have the same issue - a "reset" would be appreciated. It is not acceptable waiting 15-20 minutes to restart a unresponsive VM.

All 8 comments

Current working theory is that the Azure Linux agent is non-responsive (and not receiving the stop). @brendandixon

I suggest let the user ssh into the vm and check out /var/log/waagent.log, and we can start from there based on the content
AFAIK, no such API exists for force-stop. The next candidate would be az vm delete which i guess a bit harsh

When a VM is non responsing you do not have the possibilty to log in via SSH. We need something like all VM providers have: Reset the VM and boot in again.
I just have the same issue - a "reset" would be appreciated. It is not acceptable waiting 15-20 minutes to restart a unresponsive VM.

@singhkays, an such reset api? The closest one I cna think of is to de-allocate and restart?

@yugangw-msft I believe the redeploy API can help

@adewaleo, let us expose a --force and invoke the redeploy?

closed through #7885

Was this page helpful?
0 / 5 - 0 ratings