Achraf Ben Alaya
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
SUBSCRIBE
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
No Result
View All Result
Achraf Ben Alaya
No Result
View All Result
ADVERTISEMENT
Home Blog Cloud Azure

Where is my Money ! The Proper way To Shutdown Azure VM

achraf by achraf
November 2, 2020
in Azure, Blog, Cloud
3 min read
0
Where is my Money ! The Proper way To Shutdown Azure VM
0
SHARES
516
VIEWS
Share on FacebookShare on Twitter

I remember my first azure account , I lost about 120 $ in one day and in one single Virtual machine that I did not use !
I started the machine worked for a while , later I had an urgent call , I went out and I forget the virtual machine working  ,woke up next morning and 120 $ went away !

Vm Stopped State vs Deallocated State

The first method that we are going to explain is STOPPED  .
when you are connected to the virtual machine and you go to power options and you click
Shut Down , like that you have stopped the system but you are still renting resources from azure so you will be still paying .

The second method and the best way is to go to the portal and and clique on STOP ,like that not only the machine is stopped but also azure will deallocate the computer resources that you are using .

It’s like you rent a car from an agency for a short period of time , if you still have the keys and even the engine is stopped you will be still paying for it rent , but when you give it back you will stop paying .

Ps : you can stop the virtual machine not only from the portal but also use the Azure CLI or Azure PowerShell or even more you can use the mobile application .

Ps :While an Azure VM is in the “Stopped (Deallocated)” state, you will not be charged for the VM compute resources. However, you will still need to pay for any OS and data storage disks attached to the VM.

 

How to Deallocate the VM using using the portal

 

To stop a virtual machine from the portal ,you have to go and clique on the Stop button .

How to Deallocate the VM using the Microsoft Azure app

The Microsoft Azure app helps you keep track of your resources while on-the-go :

  • Stay connected to the cloud and check status and critical metrics anytime, anywhere .
  • Stay informed with notifications and alerts about important health issues.
  • Stay in control of your resources and take corrective actions, like starting and stopping VMs and web apps

How to Deallocate the VM using Azure CLI

you can stop the virtual machine using the below script :

 

# Stop Azure VM
az vm stop --name {vm name} --g {resource group name}
# Deallocate Azure VM
az vm deallocate --name {vm name} -g {resource group name}

 

Schedule VM Auto Shutdown

sometimes you don’t need the machine after work hours or maybe in the weekends, sometimes you forget to shut the machine down which will cost you more if you really don’t use it .

With the Auto-shutdown feature, you are able to configure a specific Time (with Time Zone) when Azure is to automatically shutdown the VM. When configured, the VM will automatically be stopped if it is still running at that time of day.

 

Well , I hope through this article I could help you save energy and some money too 🙂

ShareTweet
Previous Post

405 method not allowed in IIS

Next Post

Migration from Asp.Net Core 3.1 to 5.0 and publish to azure

Related Posts

Switch to Azure Container Registry from Docker Hub
Azure

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
132
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
229
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022
102
How to setup nginx reverse proxy for aspnet core apps with and without  Docker compose
Azure

How to setup nginx reverse proxy for aspnet core apps with and without Docker compose

November 23, 2022
153
Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁
Blog

Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁

May 28, 2022
107
Generating report for SSL Certificates for Websites with PowerShell
Azure

Generating report for SSL Certificates for Websites with PowerShell

April 10, 2022
386
Next Post
Migration from Asp.Net Core 3.1 to 5.0 and publish to azure

Migration from Asp.Net Core 3.1 to 5.0 and publish to azure

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Terraform

Certifications

Microsoft certified trainer (MCT)

Recommended

Reading Excel file in Azure Web Apps

Reading Excel file in Azure Web Apps

December 1, 2020
1.1k
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
229
Learn… and get rewarded

Learn… and get rewarded

September 28, 2020
403
Migrate and modernize your applications on Azure

Migrate and modernize your applications on Azure – Part 2.0 (Azure Functions)

April 3, 2021
286
Switch to Azure Container Registry from Docker Hub

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
132
Finally a stable version of Xamarin.Forms 4.1.0 and announcing Xamarin.Essentials 1.2

Finally a stable version of Xamarin.Forms 4.1.0 and announcing Xamarin.Essentials 1.2

April 21, 2020
378
Facebook Twitter LinkedIn Youtube
Switch to Azure Container Registry from Docker Hub

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022

Categories

  • Apps (1)
  • Azure (39)
  • blazor (2)
  • Blog (62)
  • c# (7)
  • Cloud (37)
  • Dapr (4)
  • docker (3)
  • Games (1)
  • General Tips & Fix (1)
  • motivation (2)
  • Motivation (3)
  • News (9)
  • Resume (1)
  • sql (4)
  • Tricks, Tips and Fixes (3)
  • xamarin (5)
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume