Question: Do Azure VMs incur costs when stopped?
Answer
When an Azure Virtual Machine (VM) is stopped, the cost implications depend on the state in which the VM is stopped.
Stopped vs Stopped (Deallocated)
-
Stopped State:
- If you stop an Azure VM by shutting down the operating system (e.g., using the shutdown option within the OS), the VM will be in a "Stopped" state but not deallocated. In this state, you will still be charged for the compute resources because the host resources are still allocated and not available for other customers.
- This means that even though the VM is not running, you will continue to incur costs for the compute resources.
-
Stopped (Deallocated) State:
- To avoid being charged for compute resources, you need to stop the VM and deallocate it. This can be done through the Azure Portal, Azure CLI, or Azure PowerShell. When a VM is in the "Stopped (Deallocated)" state, the compute resources are released, and you will not be charged for them.
- However, you will still be charged for the storage used by the VM's operating system disk and any data disks attached to it, as these resources continue to use space in the Azure datacenter.
Key Points:
- Compute Costs: You are not charged for compute resources when the VM is in the "Stopped (Deallocated)" state.
- Storage Costs: You will always be charged for the storage resources, regardless of the VM's state.
- Method of Stopping: To save on costs, ensure you stop and deallocate the VM through the Azure Portal or using Azure CLI/PowerShell, rather than just shutting down the OS.
By properly deallocating the VM, you can significantly reduce your Azure costs when the VM is not in use.
Was this content helpful?
Other Common Azure Cost Management Questions (and Answers)
- Does a resource group cost in Azure?
- Do staging environments in Azure cost more?
- Who can use the Azure Total Cost of Ownership (TCO) calculator?
- How to Check Costs in the Azure Portal
- Does Azure Blob Storage Search Cost Extra?
- Does Azure Arc cost money?
- Does Azure DevOps Cost Money?
- Does Azure Monitor Cost Money?
- Does Azure Key Vault Cost Money?
- What is the upfront cost in Azure?
- Is there a cost to transfer data between Azure regions?
- Does it cost to create containers in an Azure account?
White Paper
Free System Design on AWS E-Book
Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.
Switch & save up to 80%
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost