Do you know the difference between Stopped, Stopped (deallocated) virtual machine states in Microsoft Azure?
I want to tell you a very short story before I answer the question.
A friend of mine has tried out Microsoft Azure and he installed a virtual machine and he worked on it for a while. Across the Internet, he found how he can turn off the machine and not be charged by Microsoft. Basically, what he did is that while still remotely accessing the virtual machine, he simply went to the Star menu and clicked on Shut Down. One month later, an invoice arrived in the mail. In fact, they actually charged him the full amount as if he were going to use it all the time.
So, do not make the same mistake as my friend did. I wish he would have told me, or asked me, before he made such a mistake.
Now let’s look at where he made mistake.
When it comes to VMs, you need to pay attention to two states (plus the running state). There is stopped state, and there is stopped (deallocated) state.
What is Stopped State?
The Stopped state of your VM means the OS and services are stopped, but the hardware is still allocated and you are still charged, just like when it’s running. In most cases, this occurs when the user shuts down the VM from the OS itself after logging into the VM.
How to recognize if my machine is only Stopped?
- Check for the status
What is Stopped (deallocated) State?
Stopped (deallocated) is the state where no more VM computing costs are incurred. The result is that you can save money. Please keep in mind that your a dynamic public IP address will be released. Be aware that you’ll also be charged for disk usage.
Where can I tell if my machine is stopped (deallocated)?
- Check the status
- You can also see that the STOP button is grayed out.
Tip: If you want to save money on disk usage, you can switch the disk to HDD type while the VM is deallocated.