Configure Auto Start for VM in Azure DevTest Lab

Azure DevTest Lab is a service for easily creating, using, and managing infrastructure-as-a-service (IaaS) virtual machines (VMs) and platform-as-a-service (PaaS) environments in labs. Labs offer preconfigured bases and artifacts for creating VMs and Azure Resource Manager (ARM) templates for creating environments like Azure Web Apps or SharePoint farms.

The DevTest lab provides better workload management capabilities per the above service description. You can create Artifacts and configure your virtual machines for developers with the required tools. Developer machines do not need to be up all the time.

When a developer finishes testing the machine, it can be shut down. For example, your company hired a few developers to develop an application. Developers work daily, and their working hours start at 9 AM and continue until 5 PM. Outside the office hours, developers do not need their VMs. The VMs can be shut down to save on computing costs.

When you set up the Azure DevTest Lab service, the auto start and Auto shutdown feature is provided out of the box. You can configure the start time of the VMs and the days when the VMs should be started. For example, if no one will use the developer virtual machines on Saturday and Sunday, you can configure an auto-start schedule not to start the VMs over the weekend.

Steps to Configure Auto-Start of Azure Virtual Machine

  • Search for Azure DevTest labs. If you have already created an Azure DevTest Lab service, go to Configuration Settings and configure Auto Start and Auto Shutdown schedules.
  • You will first have to Configure auto-start at the DevTest Lab Service Level, and then you can enable it for each virtual machine.
  • The auto-start schedule can only be configured at the DevTest Lab Service level, which applies to all virtual machines. You need to enable Auto-Start at the VM level. Let’s see the steps to configure it.
  • Click on Devtest Lab Service in Azure, then Select Configuration and Policies under settings.
Click on Configuraiton and policies in devtestlab
Click on Configuration and Policies in devtestlab
  • Auto-start enables you to automatically initiate virtual machines in a lab at a predetermined time daily. To allow auto-start for VMs, you need to configure the following settings:
    • Configure auto-start to enable and set up a schedule.
    • Enable auto-start for each VM at the VM level.
  • Allow auto-start: Yes
  • Scheduled start: Provide a specific time for the VMs to automatically power up daily. This allows you to schedule when the VMs should start.
  • Time zone: Set the time zone.
  • Day of the Week: Select the days you apply this schedule.
Configure Auto-start of Virtual machine in Azure
Configure Auto-start of Virtual machine in Azure
  • Click on Save to save the auto-start schedule.

After configuring the auto-start schedule in the devtest lab configuration and service, you’ll also need to enable auto-start at the virtual machine level. To apply the auto-start schedule to a virtual machine, follow these steps:

  • Click on the DevTest Lab service
  • Click on Virtual Machines and Select your Virtual Machine.
  • On the left-hand side of the page, Find Auto-start under Operations.
  • Select Yes to automatically enable the virtual machine to restart per the configured schedule.

This setting will enable auto-start on this VM, and the auto-start schedule that we configured earlier from Configuration and service under DevTest lab service will be applicable. For example, in this case, this virtual machine will start every day at 7:00 AM. This schedule will apply only from Monday to Friday.

Enable Auto start at VM Level
Enable Auto start at VM Level

Once you’ve configured and enabled the auto-start feature for an Azure Virtual Machine, you also have the option to enable auto-shutdown. You can specify when you want the VMs to power up and down at specific times using auto-start and auto-shutdown settings. These settings are powerful tools for saving money on virtual machine computing expenses.

To configure the auto-shutdown settings of an Azure Virtual Machine in a DevTest Lab, you can search for a virtual machine under your DevTest Lab service and then locate the “Auto-shutdown” option under “Operations.” I won’t go into the details of auto-shutdown settings in this blog post, as they are similar to the auto-start settings of any virtual machine in Azure that we configured in the previous sections.

Configure Auto Shutdown for Azure Virtual Machines.


It is highly recommended that auto-start and auto-shutdown settings be configured for developers or virtual machines that are not continuously used. Configure these settings at the DevTest Lab service level and enable auto-start for each VM individually.

Combining auto-start with auto-shutdown settings ensures that your machines power up at a scheduled time every day and shut down at a set time. This approach helps save on VM computing costs and reduces your monthly bill.

Leave a Comment