question

MikeXShen avatar image
0 Votes"
MikeXShen asked kobulloc-MSFT commented

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

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

learn2skills avatar image
1 Vote"
learn2skills answered

Hi @MikeXShen

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.

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.

MikeXShen avatar image
0 Votes"
MikeXShen answered kobulloc-MSFT edited

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

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

@MikeXShen

Thank You, You're Welcome.

Please let us know if you have further query on this.
Please don’t forget to Accept the answer

0 Votes 0 ·
kobulloc-MSFT avatar image
0 Votes"
kobulloc-MSFT answered

Hello, @MikeXShen!

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://docs.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.




image.png (57.3 KiB)
image.png (205.1 KiB)
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.

MikeXShen avatar image
0 Votes"
MikeXShen answered kobulloc-MSFT commented

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

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

@MikeXShen, sounds good. Keep us updated!

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

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



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

@MikeXShen, thank you for the update! Good to hear that things are back on track.

0 Votes 0 ·