title | titleSuffix | description | services | ms.service | author | ms.author | ms.date | ms.topic |
---|---|---|---|---|---|---|---|---|
Set a dev box auto-stop schedule |
Microsoft Dev Box |
Learn how to configure an auto-stop schedule to automatically shut down dev boxes in a pool at a specified time. |
dev-box |
dev-box |
RoseHJM |
rosemalcolm |
04/25/2023 |
how-to |
To save on costs, you can enable an Auto-stop schedule on a dev box pool. Microsoft Dev Box will attempt to shut down all dev boxes in that pool at the time specified in the schedule. You can configure one stop time in one timezone for each pool.
To manage a dev box schedule, you need the following permissions:
Action | Permission required |
---|---|
Configure a schedule | Owner, Contributor, or DevCenter Project Admin. |
You can enable, modify, and disable auto-stop schedules using the Azure portal.
You can create an auto-stop schedule while creating a new dev box pool, or by modifying an already existing dev box pool. The following steps show you how to use the Azure portal to create and configure an auto-stop schedule.
-
Sign in to the Azure portal.
-
In the search box, type Projects and then select Projects from the list.
:::image type="content" source="./media/how-to-manage-stop-schedule/discover-projects.png" alt-text="Screenshot showing a search for projects from the Azure portal search box.":::
-
Open the project associated with the pool you want to edit.
:::image type="content" source="./media/how-to-manage-stop-schedule/projects-grid.png" alt-text="Screenshot of the list of existing projects.":::
-
Select the pool you wish to modify, and then select edit. You might need to scroll to locate edit.
:::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-edit-pool.png" alt-text="Screenshot of the edit dev box pool button.":::
-
In Enable Auto-stop, select Yes.
Name Value Enable Auto-stop Select Yes to enable an Auto-stop schedule after the pool has been created. Stop time Select a time to shutdown all the dev boxes in the pool. All Dev Boxes in this pool shutdown at this time every day. Time zone Select the time zone that the stop time is in. :::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-save-pool.png" alt-text="Screenshot of the edit dev box pool page showing the Auto-stop options.":::
-
Select Save.
-
Sign in to the Azure portal.
-
In the search box, type Projects and then select Projects from the list.
:::image type="content" source="./media/how-to-manage-stop-schedule/discover-projects.png" alt-text="Screenshot showing a search for projects from the Azure portal search box.":::
-
Open the project with which you want to associate the new dev box pool.
:::image type="content" source="./media/how-to-manage-stop-schedule/projects-grid.png" alt-text="Screenshot of the list of existing projects.":::
-
Select Dev box pools and then select + Create.
:::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-pool-grid-empty.png" alt-text="Screenshot of the list of dev box pools within a project. The list is empty.":::
-
On the Create a dev box pool page, enter the following values:
Name Value Name Enter a name for the pool. The pool name is visible to developers to select when they're creating dev boxes, and must be unique within a project. Dev box definition Select an existing dev box definition. The definition determines the base image and size for the dev boxes created within this pool. Network connection Select an existing network connection. The network connection determines the region of the dev boxes created within this pool. Dev Box Creator Privileges Select Local Administrator or Standard User. Enable Auto-stop Yes is the default. Select No to disable an Auto-stop schedule. You can configure an Auto-stop schedule after the pool has been created. Stop time Select a time to shutdown all the dev boxes in the pool. All Dev Boxes in this pool shutdown at this time every day. Time zone Select the time zone that the stop time is in. Licensing Select this check box to confirm that your organization has Azure Hybrid Benefit licenses that you want to apply to the dev boxes in this pool. :::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-pool-create.png" alt-text="Screenshot of the Create dev box pool dialog.":::
-
Select Add.
-
Verify that the new dev box pool appears in the list. You may need to refresh the screen.
To delete an auto-stop schedule, first navigate to your pool:
-
Sign in to the Azure portal.
-
In the search box, type Projects and then select Projects from the list.
:::image type="content" source="./media/how-to-manage-stop-schedule/discover-projects.png" alt-text="Screenshot showing a search for projects from the Azure portal search box.":::
-
Open the project associated with the pool you want to edit.
:::image type="content" source="./media/how-to-manage-stop-schedule/projects-grid.png" alt-text="Screenshot of the list of existing projects.":::
-
Select the pool you wish to modify, and then select edit. You might need to scroll to locate edit.
:::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-edit-pool.png" alt-text="Screenshot of the edit dev box pool button.":::
-
In Enable Auto-stop, select No.
:::image type="content" source="./media/how-to-manage-stop-schedule/dev-box-disable-stop.png" alt-text="Screenshot of the edit dev box pool page showing Auto-stop disabled.":::
-
Select Save. Dev boxes in this pool won't automatically shut down.
You can also manage auto-stop schedules using Azure CLI.
az devcenter admin schedule create -n default --pool {poolName} --project {projectName} --time 23:15 --time-zone "America/Los_Angeles" --schedule-type stopdevbox --frequency daily --state enabled
Parameter | Description |
---|---|
poolName | Name of your pool |
project | Name of your Project |
time | Local time when Dev Boxes should be shut down |
time-zone | Standard timezone string to determine local time |
az devcenter admin schedule delete -n default --pool {poolName} --project {projectName}
Parameter | Description |
---|---|
poolName | Name of your pool |
project | Name of your Project |