question

keryildirim-3096 avatar image
0 Votes"
keryildirim-3096 asked tbgangav-MSFT edited

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 ?

azure-virtual-machinesazure-virtual-desktopazure-cost-managementwindows-10-hyperv
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlanKinane avatar image
2 Votes"
AlanKinane answered keryildirim-3096 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you Alan, i didnt think about additional costs.

0 Votes 0 ·
kobulloc-MSFT avatar image
1 Vote"
kobulloc-MSFT answered keryildirim-3096 commented

Hello, @keryildirim-3096!

This is a common question so I'd like to expand a bit on what @AlanKinane 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://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-acm-cost-analysis


187590-image.png


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:

187599-image.png

For additional information, you can read our documentation on billing states:

https://docs.microsoft.com/en-us/azure/virtual-machines/states-billing


image.png (192.5 KiB)
image.png (51.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for detailed explanation kobulloc -MSFT

1 Vote 1 ·