what's the difference between deallocated and stopped ? my test VM burning rate too high

Mike X Shen 56 Reputation points
2021-10-02T11:12:19.737+00:00

Hi there

I am doing some tests. I scheduled a test VM to shutdown and deallocate overnight.

But tonight, I noticed in azure portal, the VM status showing as deallocated, but the stopped button is still available to click

I clicked stopped, I saw a message that a public IP will not be kept. That's OK

The VM (Standard_D4s_v3) is burning about $10.00 NZD, however Microsoft monthly price listed is 275.93 NZD

Can someone shed some light on this problem

Kind Regards

Michael

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,514 questions
0 comments No comments
{count} votes

Accepted answer
  1. SUNOJ KUMAR YELURU 14,016 Reputation points MVP
    2021-10-02T15:36:14.94+00:00

    Hi @Anonymous

    If your VM is not running, it will have one of two states — Stopped, or Stopped (deallocated).

    Azure’s Stopped State
    When you are logged in to the operating system of an Azure VM, you can issue a command to shut down the server. This will kick you out of the OS and stop all processes, but will maintain the allocated hardware (including the IP addresses currently assigned). If you find the VM in the Azure console, you’ll see the state listed as “Stopped”. The biggest thing you need to know about this state is that you are still being charged by the hour for this instance.

    Azure’s Deallocated State
    The other way to stop your virtual machine is through Azure itself, whether that’s through the console, Powershell, or the Azure CLI. When you stop a VM through Azure, rather than through the OS, it goes into a “Stopped (deallocated)” state. This means that any non-static public IPs will be released, but you’ll also stop paying for the VM’s compute costs. This is a great way to save money on your Azure costs when you don’t need those VMs running, and is the state that ParkMyCloud puts your VMs in when they are parked.

    If the Answer is helpful, please click Accept Answer and up-vote, so that it can help others in the community looking for help on similar topics.

    87 people found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. kobulloc-MSFT 26,131 Reputation points Microsoft Employee
    2021-10-03T17:00:57.82+00:00

    Hello, @Anonymous !

    I'd like to revisit your original question briefly, then describe why you might still be seeing charges after a VM is deallocated, and if that doesn't work we can try some additional troubleshooting.

    What's the difference between Stopped vs Deallocated?
    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 and in this state 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 you need to set the VM to the Stopped(Deallocated) state:

    137139-image.png

    This is the Microsoft documentation that goes into this in more detail:

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

    Why might I still be charged for a VM?
    There are other costs associated with your VM other than just compute time. In particular, storage costs can continue to accumulate after your VM has been deallocated because you are continuing to store data to use later. In your resource group, go to Cost Management > Cost analysis to see what you are being billed for.

    137203-image.png

    My VM is Stopped (deallocated) but I'm still being billed for VM cost
    You should not be billed for virtual machine use while your VM is in the Stopped (deallocated) state. If you are seeing this, please let me know so that we can investigate this on our end.

    3 people found this answer helpful.

  2. Mike X Shen 56 Reputation points
    2021-10-05T08:53:04.27+00:00

    Hi there

    I checked again

    Last night , the balance is 100.56 at 10:03pm 4/10/21 local time

    This morning the balance is 97.82 at 9:37am 5/10/21 local time

    I would say the VM is OK in terms of cost

    I am not sure why this mess happened in the first place

    My educated guess is that there was a mix-up after I changed the task schedule one week ago. The deallocate task happened before shutdown task

    After I put the tasks in a proper sequence, the VM costs has gone back to normal

    Thanks for all your help

    Kind Regards

    Michael

    2 people found this answer helpful.

  3. Mike X Shen 56 Reputation points
    2021-10-02T21:58:54.76+00:00

    Thanks for the reply

    I feel even if I manually stopped (deallocated) the VM, the VM is still burning money

    Last night, the balance was $114.45 at 11:17pm. This morning the balance is $111.31 at 10:05am. The VM was totally off according to the log in the Azure portal

    I rescheduled the VM to power off / shutdown at 8:19pm local time; and deallocate at 8:29:29pm.

    The VM is scheduled to start at 8:01:01am every morning

    This is first time this happened. As in the long past, when I turned off a VM(deallocate) , the VM would not incur more cost apart from the disk charge

    I will check again tonight, and tomorrow morning

    Thanks again

    Michael


  4. Mike X Shen 56 Reputation points
    2021-10-03T23:31:37.08+00:00

    Thanks for all your reply

    last night the balance was $106.13 at 11:39pm local time. The VM status was stopped (deallocated)
    This morning the balance was 104.49 at 9:30am
    looks like the cost is coming down
    I will stop the StartVM task for tomorrow morning to see the VM incur any charges (other than disk and backup)

    Kind Regards

    Michael