Virtual machine pricing for hours

keryildirim 31 Reputation points
2022-03-28T12:41:02.353+00:00

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 Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,125 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,033 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,362 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,538 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,786 Reputation points MVP
    2022-03-28T14:42:30.933+00:00

    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.

    2 people found this answer helpful.

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

    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://learn.microsoft.com/en-us/azure/virtual-machines/states-billing

    1 person found this answer helpful.