Editja

Ixxerja permezz ta’


Configure automatic shutdown of VMs for a lab plan

Important

Azure Lab Services will be retired on June 28, 2027. For more information, see the retirement guide.

Note

This article references features available in lab plans, which replaced lab accounts.

You can enable several auto-shutdown cost control features to avoid extra costs when the virtual machines aren't being used.

  • Disconnect idle virtual machines.
  • Shutdown virtual machines when users disconnect
  • Shutdown virtual machines when users don't connect

The disconnect idle virtual machines has two settings. Both settings use a VM extension to detect idle.

  • Detect idle based on user absence. Idle detection examines only mouse/keyboard input (user absence).
  • Detect idle based on user absence and resource usage. Idle detection examines both mouse/keyboard input (user absence) and disk/CPU usage (resource usage). By selecting resource usage, that is, disk/CPU usage, operations such as long-running queries are accounted for.

Review more details about the auto-shutdown features in the Maximize cost control with auto-shutdown settings section.

Azure Lab Services supports automatic shutdown for both Windows-based and Linux-based virtual machines. For Linux-based VMs, support depends on the specific Linux distribution and version.

Enable automatic shutdown

  1. In the Azure portal, navigate to the Lab Plan page.

  2. Select Labs settings on the left menu.

  3. Select the auto-shutdown setting(s) that is appropriate for your scenario.

    Automatic shutdown setting at lab plan

    The setting(s) apply to all the labs associated with the lab plan. A lab creator (educator) can override this setting at the lab level. The change to this setting at the lab plan will only affect labs that are created after the change is made.

    To disable the setting(s), uncheck the checkbox(s) on this page.

Supported Linux distributions for automatic shutdown

Azure Lab Services supports automatic shutdown for many Linux distristributions and versions.

The following list provides the supported Linux distribution Azure Marketplace images for lab plan-based labs:

Distribution Azure Marketplace image
Debian - Debian 11 "Bullseye"
- Debian 11 "Bullseye"(Gen2)
Ubuntu Minimal - Ubuntu Minimal 18.04 LTS
- Ubuntu Minimal 20.04 LTS (Gen2)
- Ubuntu Minimal 22.04 LTS
- Ubuntu Minimal 22.04 LTS (Gen2)
- Ubuntu Minimal 22.10
- Ubuntu Minimal 22.10 (Gen2)
Ubuntu Server - Ubuntu Server 18.04 LTS (Gen2)
- Ubuntu Server 20.04 LTS
- Ubuntu Server 20.04 LTS (Gen2)
- Ubuntu Server 22.04
- Ubuntu Server 22.04 (Gen2)
- Ubuntu Server 22.10
- Ubuntu Server 22.10 (Gen2)
Ubuntu-HPC - Ubuntu-HPC 20.04 (Gen2)

Next steps

To learn about how a lab owner can configure or override this setting at the lab level, see Configure automatic shutdown of VMs for a lab