Tuesday, June 20, 2017

VM is currently stop-deallocating and cannot be re-allocated during this period. Azure Start, Stop, Restart ARM

while working Azure, in one of my auto start, stop script, hew VMs did not stop properly and the status was "failed".
Start was disabled though Stop and Restart was enabled.
when click Stop. Restart I get below error.
"Failed to Stop the virtual machine 'TCAOSVM'. Error: VM /subscriptions/273d2043-014a-493b-8a88-9d8b88b9f65e/resourceGroups/TCDev/providers/Microsoft.Compute/virtualMachines/TCAOSVM is currently stop-deallocating and cannot be re-allocated during this period. Perform stop-deallocate of the VM /subscriptions/273d2043-014a-493b-8a88-9d8b88b9f65e/resourceGroups/TCDev/providers/Microsoft.Compute/virtualMachines/TCAOSVM again or retry this operation in some time."


in the Job (script was running), I got below error


"Stop-AzureRmVM : Long running operation failed with status 'Failed'.
StartTime: 6/19/2017 11:33:03 AM
EndTime: 6/19/2017 11:33:04 AM
OperationID: 9254d922-6257-49e6-8f06-1fc8e909cd3f
Status: Failed
ErrorCode: InternalExecutionError
ErrorMessage: An internal execution error occurred.
At autostopALLVMs_TSM:3 char:3
+
    + CategoryInfo          : CloseError: (:) [Stop-AzureRmVM], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.StopAzureVMCommand"



I have tried all, stop, restart, redeploy, size change, still no luck




but when i just added some tag into it and then STOP-> Start. it just worked.






nothing over internet, hope it will help someone.