Score:-1

How to turnoff machine completely in azure?

cn flag

In AWS, when I turnoff my windows machine with shutdown command inside it. The AWS portal, it will show as turned off.

But in azure, if I turnoff from portal, it is releasing IP and showing as turned off.

turnoff from portal

But if I turn it off from machine, it is showing as stopped but not deallocated and keeping the public IP still. shutdown from machine

stopped only

What is the billing difference in the above two? And, users will ask us to turn it on when they use it and shutdown the machine from their end. They will ask us to turn it on and we can provide the IP address as a reply to them manually through teams/skype.

So, is there anyway to change to stopped/deallocated when I turn off the machine from shutdown command on the machine?

How to

Score:1
cn flag

Shutting down a VM will not deallocate the underlying resources and charges still applies. Stopping a VM will deallocate the compute resources and compute charges will stop.

You can stop a VM using the Powershell Stop-AzVM command or the Azure CLI az vm stop command.

Sara June avatar
cn flag
But we need to do it from user's end, who don't have access to portal/CLI. They have only access to this machine. Configuring CLI on that machine is also not an option as it will give access to complete account
CSharpRocks avatar
cn flag
One option: Start/Stop VMs during off-hours https://docs.microsoft.com/en-us/azure/automation/automation-solution-vm-management
Sara June avatar
cn flag
Can we do anything from that VM? Because there are many machines like that and setting off-hours is also not feasible as it might turn off the machine.
CSharpRocks avatar
cn flag
Another option: Deallocate Azure VMs automatically using a RunBook https://azurecloudai.blog/2020/05/14/azure-deallocate-stopped-vms-automacatlly-and-save-yourself-money/
Sara June avatar
cn flag
I will try this option and let you know. Also, I saw an api in this question: https://stackoverflow.com/questions/58480090/how-do-i-create-a-job-in-jenkins-to-start-and-stop-the-azure-vms as the first answer. https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/start But how to use this api, can we just create a shortcut to launch this API call linked to a machine, is there any token generation to do for this purpose?
CSharpRocks avatar
cn flag
The answer is in the doc you referred
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.