Ensure that a Virtual Machine in Azure is stopped

2016-08-29 | Toni Pohl

Since it still happens from time to time that customers forget that their Virtual Machines (VMs) in Azure need to be deallocated to stop producing costs, here’s a small reminder for all Azure users who are using the Azure Portal https://portal.azure.com to administer their VMs.

A running VM is displayed as here:


To stop a VM, click the Stop menu and confirm.


Now the VM is being stopped and the deallocating process starts.


A stopped and deallocated VM is displayed as here – this usually takes some minutes.


If you shutdown a VM, use cmd and shutdown –s –f –t 0


Maybe the Azure Portal does not see the running status of the VM correctly instantly and says Status “unknown”…

But, after some minutes the VM will be stopped. It’s nice that the Azure RM portal informs, that Status “stopped” is NOT identical with “deallocated”:


In this case you need to click the “Stop” menu again to deallocate the resources of the VM (and confirm you really want to stop the resource binding)!

Then, no more costs will be procduced by the resources of that VM – all is ok.


Once a VM is stopped, any dynamic public IP address bound to that VM will be removed – and when starting, a new dynamic Public IP address will be assigned. So the RDP connection to that VM must be downloaded again or be changed manually.

Just to keep in mind that using the Azure Portal is very convenient and quick – but for real world scenarios it is recommended to use Scripting to automate processes, DevLabs and there exist many options in Azure to work with various resources.

Happy VM-ing!

Categories: Azure, Cloud, English, Microsoft, Windows

Source: https://blog.atwork.at/post/Ensure-that-a-Virtual-Machine-in-Azure-is-stopped