Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to suspend and resume a windows Azure server?

Tags:

azure

suspend

I have a program that I run only 1-2 hours a day. Is there a way to suspend the Azure server so I don't pay for it, then resume it later? How fast is it to suspend and then resume?

like image 552
vy32 Avatar asked Sep 17 '12 22:09

vy32


People also ask

Can I pause Azure VM?

Manually Shutdown VM within Azure PortalWithin the Azure Portal, navigate to the Virtual Machine blade for the desired VM. On the Overview pane, click the Stop button.

What happens when you stop a VM in Azure?

When you stop a VM through Azure, rather than through the OS, it goes into a “Stopped (deallocated)” state. This means that any non-static public IPs will be released, but you'll also stop paying for the VM's compute costs.

What is difference between stopped and deallocated in Azure?

If the VM is in de-allocated state, then its IP gets detached (if a static IP is not assigned). Stopped: This happens if you shut down the instance through the machine itself.


2 Answers

To clarify here, Azure no longer charges for stopped VMs. The billing change was announced in 2013 on Scott Guthrie's blog: No Charge for Stopped VMs.

This means you can use the portal or APIs to stop a VM without deallocating the resource - and avoid charges at the same time.

like image 195
thauburger Avatar answered Oct 18 '22 21:10

thauburger


Not sure if you are asking for Window Azure Cloud Services or for Windows Azure Virtual Machines but you sure can stop/start these Azure Virtual Machines directly on Windows Portal or using Powershell or REST based Service Management API. The Windows Azure Portal does not provide a way to schedule stop/restart so you will have to manually do it by yourself or use some 3rd party service i.e. AzureWatch etc to do it.

Note: Even if you shutdown the Virtual Machine or Cloud Service, you will still pay for if you want to do it for cost saving, then you would need to delete the service or VM. Reboot/Restart does not take long as VM is already configured and ready to run so it is just the time to turn on a pre-configured VM.

If you want to use REST API in your own application to stop/start here is some help:

  • Virtual Machines: http://msdn.microsoft.com/en-us/library/windowsazure/jj157206.aspx
  • Cloud Service: http://msdn.microsoft.com/en-us/library/windowsazure/gg441298.aspx

If you want to use Powershell to stop/Start Azure VM look for "Start-AzureVM" and "Stop-AzureVM" cmdlet below:

http://msdn.microsoft.com/en-us/library/windowsazure/jj152841.aspx

like image 31
AvkashChauhan Avatar answered Oct 18 '22 19:10

AvkashChauhan