How is the spot price calculated?

afkr 0 Reputation points
2023-09-04T02:14:50.14+00:00

How is the spot price calculated, if I stop the VM will it be included in the bill or will I just charge the disk? Here I am using the disk that came with the VM NV4as v4, I am using a spot VM so at any time it can turn itself off, if my VM suddenly turns off because I use spot, will there be a fee?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,044 questions
{count} votes

2 answers

Sort by: Most helpful
  1. TP 125.8K Reputation points Volunteer Moderator
    2023-09-04T03:07:08.8633333+00:00

    Hi,

    When the Spot VM is Stopped and Deallocated, you won't be charged for Compute, however, you will still be charged for the OS Disk, any data disk(s), public IP address, etc. If Azure evicts your Spot VM it is same as if you manually Deallocated it--you won't be charged for Compute, but you will still be charged for the other resources associated with the VM (Disks/etc.).

    Please click Accept Answer if the above was helpful. If something is unclear or you still need assistance please add a comment below.

    Thanks.

    -TP


  2. Prrudram-MSFT 28,286 Reputation points Microsoft Employee Moderator
    2023-09-12T17:46:25.23+00:00

    Hello @afkr

    Thank you for reaching out to the Microsoft Q&A platform.

    The spot price for Azure Virtual Machines is calculated based on supply and demand. The price changes based on the availability of unused capacity in the Azure datacenters. The price is set per hour and varies by region and VM size. You can view the current spot prices for each region and VM size on the Azure pricing page.

    If you stop a spot VM, you will only be charged for the disk storage. You will not be charged for the compute resources while the VM is stopped. However, if the VM is deallocated due to capacity constraints, you will be charged for the time that the VM was running before it was deallocated.

    When you use a spot VM, there is a chance that the VM may be evicted at any time due to capacity constraints. If the VM is evicted, you will not be charged for the time that the VM was not running. However, if the VM is evicted due to a policy violation, such as exceeding the maximum price that you set, you may be charged for the time that the VM was running before it was evicted.

    In your case, if your NV4as v4 VM suddenly turns off because you are using a spot VM, there will be no fee for the compute resources while the VM is not running. However, you will still be charged for the disk storage. If the VM is evicted due to a policy violation, you may be charged for the time that the VM was running before it was evicted.

    If this does answer your question, please accept it as the answer as a token of appreciation.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.