Answered by:
Stopped (Deallocated)

Question
-
Hi,
When I log on to the Azure Portal, I can see a handful of recently shutdown VMs having a status of "Stopped (Deallocated)". Can someone tell me why this has started to happen as it means the VM has to provision a new IP when it starts up which makes the process considerably longer?
Many thanks in advance.Thursday, June 6, 2013 8:48 AM
Answers
-
Stopped (Deallocated) is the new status that indicates the VM is stopped and you are not being billed the hourly compute time for the VM while it is in that state.
Note that you can still have the VM go to the Stopped state where it stays allocated and you continue to be charged the compute time. To do this, you can shutdown the VM from within the VM (so within an RDP session for Windows, or via SSH for Linux). You can also use Stop-AzureVM -StayProvisioned, which is a new parameter available in Azure PowerShell June 2013 (0.6.15). And the current Azure CLI tool version, 0.6.16, will put it in Stopped if you run azure vm shutdown.
It is when you click Shutdown in the management portal, or use Stop-AzureVM without the -StayProvisioned parameter, that the VM will go to Stopped (Deallocated).
Note that as part of it being deallocated, if the VM being stopped is the last running VM in the cloud service, the portal will display the warning that the external IP (VIP) will change, and when you start the VM again, it will have a new VIP. Note that the DNS name does not change. And if you have multiple VMs in a cloud service, as long as at least one is still Running or Stopped, the VIP will persist. It is only when all VMs in the cloud service are in state Stopped (Deallocated) that the VIP will change when one of them is started again.
Thanks,
Craig- Proposed as answer by Craig LandisMicrosoft employee Thursday, June 6, 2013 2:11 PM
- Marked as answer by jonnyboy1611 Friday, June 7, 2013 9:47 AM
Thursday, June 6, 2013 2:11 PM
All replies
-
Stopped (Deallocated) is the new status that indicates the VM is stopped and you are not being billed the hourly compute time for the VM while it is in that state.
Note that you can still have the VM go to the Stopped state where it stays allocated and you continue to be charged the compute time. To do this, you can shutdown the VM from within the VM (so within an RDP session for Windows, or via SSH for Linux). You can also use Stop-AzureVM -StayProvisioned, which is a new parameter available in Azure PowerShell June 2013 (0.6.15). And the current Azure CLI tool version, 0.6.16, will put it in Stopped if you run azure vm shutdown.
It is when you click Shutdown in the management portal, or use Stop-AzureVM without the -StayProvisioned parameter, that the VM will go to Stopped (Deallocated).
Note that as part of it being deallocated, if the VM being stopped is the last running VM in the cloud service, the portal will display the warning that the external IP (VIP) will change, and when you start the VM again, it will have a new VIP. Note that the DNS name does not change. And if you have multiple VMs in a cloud service, as long as at least one is still Running or Stopped, the VIP will persist. It is only when all VMs in the cloud service are in state Stopped (Deallocated) that the VIP will change when one of them is started again.
Thanks,
Craig- Proposed as answer by Craig LandisMicrosoft employee Thursday, June 6, 2013 2:11 PM
- Marked as answer by jonnyboy1611 Friday, June 7, 2013 9:47 AM
Thursday, June 6, 2013 2:11 PM -
Hi Craig,
Thank you very much for your prompt response. Now I know how it functions, I can utilize it as a cost saving mechanism.
Kind regards
Jon
Friday, June 7, 2013 9:49 AM -
Ah cool. I Couldnt see my deallocated Azure VMs with Get-AzureVM , I updated to latest June cmdlets as per post and now they DO appear
cheers,
Andy.
Sunday, June 9, 2013 8:37 AM -
Hi Craig, Can a deallocated VM be started (reallocated) via any API or Powershell command? If no, why not?
Thanks
Dhana
Monday, June 17, 2013 6:12 AM -
Hi! Why is no mention of this in the original post where this was announced? I think we need a bit more of info and not having to search a post like this for know that.
Tuesday, June 18, 2013 2:57 PM -
Tuesday, June 25, 2013 10:27 AM
-
Hi All,
Using the REST API do the following
Change your version to "x-ms-version: 2013-06-01" and include "PostShutdownAction>StoppedDeallocated</PostShutdownAction>" in the shut down XML body (see below) and this will "Stop deallocated" the VM's.
<ShutdownRoleOperation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<OperationType>ShutdownRoleOperation</OperationType>
<PostShutdownAction>StoppedDeallocated</PostShutdownAction>
</ShutdownRoleOperation>Hope this helps ;-).
Damian
Thursday, August 8, 2013 11:01 AM -
Hello Craig,
VM is shutdown. Additional SSD disk which we have purchased along with VM will be charged. Please confirm.
Regards,
Renga.
Friday, December 7, 2018 9:15 AM