When managing Azure Virtual Machines (VMs), the terms Deallocated and Stopped refer to different VM states, each with distinct implications for billing and resource allocation.


OS-level shutdown

When you trigger a command directly on the OS to shutdown the virtual machine, the virtual machine will stop all processes and shutdown but its compute resources like CPU, memory and also its IP addresses are still allocated to the virtual machine even though the VM isn’t running.

!! Note !!
Therefore you will be continued to be billed for the VM’s compute resources because they are still allocated.



Azure-level shutdown

When you trigger the shutdown of the virtual machine in contrast from Azure, either through the Azure Portal or Azure Cloud Shell (PowerShell or Azure CLI), the virtual machine also stops all processes and shutdown but here its compute resources and dynamic IP addresses will be released and no longer reserved.

Therefore you are not billed for the VM’s compute resources while its deallocated.



Use Case

So when you just temporarily need to stop operations and want to keep the VM resources reserved for quick restarts, trigger the shutdown directly on the OS and when you want to save costs and the VM’s compute resources and dynamic IP addresses doesn’t needs to be reserved, stop the VM via the Azure Portal or Azure Cloud Shell (PowerShell or Azure CLI).


Auto shutdown isn’t the same as when you shut down within the VM with power options.

Auto shutdown stops and deallocates your VMs to stop additional usage charges. For more information, see pricing FAQ for Linux VMs and Windows VMs about VM states.

Source: https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/plan-manage-costs#consider-cost-cutting-features-like-auto-shutdown-for-vms




Links

Plan to manage Azure costs
https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/plan-manage-costs

Consider cost-cutting features like auto shutdown for VMs
https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/plan-manage-costs#consider-cost-cutting-features-like-auto-shutdown-for-vms