Dragonfly Cloud announces new enterprise security features - learn more

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)

  1. 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.
  2. 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?

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.

Free System Design on AWS E-Book

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