In few of my previous articles listed below, we have learned how to create different Virtual Machine in Azure using Infrastructure as a Service offering by Microsoft.
- Azure Portal – Create Virtual Machine with SQL Server
- Create A New Virtual Machine Using the New Azure Management Portal
You can utilize these Virtual Machines for multiple purposes depending on the requirements that you might have. You might then host your different type of work loads on these Virtual machines.
There might be cases where you would like to shut-down the Virtual Machines when they are not in use. For example: Non-business hours, Weekends etc.
Shutting down (deallocate) the Virtual Machines would definitely reduce the costs because, it doesn’t make sense to have them up and running when you are sure that your users are not going to use them at specific set of the times.
In one of my previous articles, we have discussed about Shutting down the Virtual Machine that is associated with a Dev/Test lab.
Azure DevTest Labs: Policies to Control Costs – Part Two (http://www.c-sharpcorner.com/article/azure-devtest-labs-policies-to-control-costs-part-two/ )
Microsoft Azure team has recently announced a similar Auto-Shut shown for regular Virtual Machines. You can shut-down your Virtual Machine at a specific time based on the time-time that you configure.
Let’s see how to shut down the Virtual. Login to your Azure account and navigate to the Virtual Machines that you would like to shut down as shown below.
Clicking on the Virtual Machine, you will be taken to the following page.
Click on the “Auto Shut down” menu as shown below.
Clicking on the Auto-shutdown you will be taken to the following blade where you can configure the details for shutting down the Virtual Machine.
As shown in the above screen capture, click on the “ON” button of the Enabled field and click on “Save” to save the changes.
That’s it. We have configured the Virtual Machine to get auto shutdown at 10:00 A.M as per the above screen capture. You can specify anytime that you would like along with the Time Zone.
Below is the screen capture taken at 10:00 A.M after the VM got shut down.
Summary: In this article, we have learned how to configure Auto-shutdown for a Virtual Machine that is created using Infrastructure as a Service offering from Microsoft Azure team.