Edit

Share via


Automatically start lab VMs with autostart in Azure DevTest Labs

This article shows how to configure and apply an autostart policy for Azure DevTest Labs virtual machines (VMs). Autostart automatically starts up lab VMs at specified times and days.

To implement autostart, you first configure an autostart policy for the lab. You can then enable the policy for individual lab VMs. Requiring individual VMs to enable autostart helps prevent unnecessary startups that could increase costs.

You can also configure autoshutdown policies for lab VMs. For more information, see Configure autoshutdown for lab VMs in DevTest Labs.

Prerequisites

None

Configure autostart for the lab

To configure an autostart policy for a lab, complete these steps. After you configure the policy, enable autostart for each VM that you want to start automatically.

  1. On your lab Overview page, select Configuration and policies under Settings in the left navigation.

    Screenshot that shows selecting Configuration and policies in the left navigation menu.

  2. On the Configuration and policies page, select Auto-start under Schedules in the left navigation.

  3. Select Yes for Allow auto-start.

    Screenshot of Auto-start option under Schedules.

  4. Enter a Scheduled start time, select a Time zone, and select the checkboxes next to the Days of the week that you want to add to the schedule.

  5. Select Save.

    Screenshot of autostart schedule settings.

Add VMs to the autostart schedule

After you configure the autostart policy, complete these steps for each VM that you want to start automatically.

  1. On your lab Overview page, select the VM under My virtual machines.

    Screenshot of selecting a VM from the list under My virtual machines.

  2. On the VM's Overview page, select Auto-start under Operations in the left navigation.

  3. On the Auto-start page, select Yes for Allow this virtual machine to be scheduled for automatic start, and then select Save.

    Screenshot of selecting Yes on the Auto-start page.

  4. On the VM Overview page, your VM shows Opted-in status for autostart.

    Screenshot showing a VM with opted-in status for autostart checked.

    You can also see the autostart status for the VM on the lab Overview page.

    Screenshot showing the lab overview page, with VM auto-start set to Yes.