For virtual machines, you are priced by the second for allocated compute time. So if you run it for 10 minutes, you will be charged for 10 minutes of compute time. Furthermore, you will have additional costs such as disk storage. Your virtual machine at a minimum will need an OS disk which you must also pay for. This is a persistent cost so you will be charged for this regardless of whether the virtual machine is allocated or not. You may also have other costs such as public IP addresses, network charges (VNET peering, data egress) etc.
Virtual machine pricing for hours
I didnt use service even a hour totally ( sometimes with short period like 5-10 min) but my initial credit decreased from 200 to like 191. Dont understand how microsoft calculates using price. After using virtual machine i disconnect it from remote desktop and stop machine on azure website. Help ?
2 answers
Sort by: Most helpful
-
-
kobulloc-MSFT 23,341 Reputation points Microsoft Employee
2022-03-28T18:15:41.85+00:00 Hello, @keryildirim !
This is a common question so I'd like to expand a bit on what @Alan Kinane has said with a couple tools you can use to better understand costs.
Understanding costs with Cost Analysis
One of the best tools for understanding costs when you are starting out is Cost Analysis. This will help you better understand how persistent storage costs are billed, keep track of your compute and network usage, and provide an estimate for future costs. You can find Cost Analysis by going to your Resource Group and then clicking on Cost analysis under Cost Management.https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/quick-acm-cost-analysis
Cost related resources
There are a set of tools that are especially helpful when looking to plan and better understand costs. Cost analysis is a great way to get detailed information about billing as you use resources, in addition to future estimates based on current use. The Azure Pricing Calculator is a great tool for creating estimates based on project needs. Azure Pricing pages will give you prices on different options and can be a great way to compare different solutions that may work best for your needs.Understanding the difference between Stopped and Deallocated
I know that you said you stopped the virtual machine but this is something that can be easily overlooked when first starting out so I'm going to include this for other readers.There are many reasons why you may want to temporarily power down a VM, like restarting after installing software. Stopped(Allocated) is simply the PoweredOff state. While powered off, Azure keeps your hardware reserved so you can resume using your VM. Since Azure is reserving the hardware for you, you will continue to be billed. To turn off your VM and release your hardware back to Azure so it can be used by others you need to set the VM to the Stopped(Deallocated) state:
For additional information, you can read our documentation on billing states:
https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing