Answered by:
Stopped (Deallocated)
-
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.
Question
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, Moderator Thursday, June 06, 2013 2:11 PM
- Marked as answer by jonnyboy1611 Friday, June 07, 2013 9:47 AM
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, Moderator Thursday, June 06, 2013 2:11 PM
- Marked as answer by jonnyboy1611 Friday, June 07, 2013 9:47 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.
-
-
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