1
I have several services in some Resource Groups in Azure, today I have to stop one by one when needed! It is possible to stop all at once?
1
I have several services in some Resource Groups in Azure, today I have to stop one by one when needed! It is possible to stop all at once?
1
No, it does not have this functionality the way you look for it. This pq is not every service that has the "Stop" option. The only thing you can do in batches is to delete an entire Resouce Group - which already helps a lot.
But, you can use Azure bash with CLI to make it very simple. Here’s an example of how to start, stop and de-locate Vms.
# example usage
az vm start --ids $(
az vm list --query "[].id"
-o tsv | grep "Test"
)
az vm stop --ids $(
az vm list --query "[].id"
-o tsv | grep "Test"
)
az vm deallocate --ids $(
az vm list --query "[].id"
-o tsv | grep "Test"
)
Source: https://buildazure.com/2017/06/07/azure-cli-2-0-quickly-start-stop-all-vms/
Browser other questions tagged windows-azure
You are not signed in. Login or sign up in order to post.
You can do the same scheme you did with VM for Web App’s?
– mcamara
No, because the command
az webapp stop
does not accept array ofids
. But I confess that I do not see much sense in it, because you would stop all webapps of a Source group?– Thiago Lunardi
I want to stop all services because it has already reached my credit limit and I don’t want to leave it on, but then you talk, Azure has a lock for that, yes, it does. But I took the lock because I want to test my APP after turn everything off, then turn it on again when testing, understood?
– mcamara
I just wanted a way to turn everything off while not using to not keep accounting.
– mcamara
Webapp does not stop counting, even stopped.
– Thiago Lunardi
Got it, if I stop the VM’s at least stop counting? In this command above I don’t lose them right? As I understand it, webapp’s don’t spend much, but VM’s seem to.
– mcamara
Stop VM only accounts for Storage, but computing time does not.
– Thiago Lunardi