Skip to main content


As a lab owner, you now have the option to configure all your lab virtual machines (VMs) to be created in a single resource group. This feature helps in the following scenarios:

  • Have fewer resource groups created by labs in your subscription.
  • Have your labs operate within a fixed set of resource groups that you configure.
  • Work around restrictions and approvals required for creating resource groups within your Azure subscription.
  • Consolidate all your lab resources within a single resource group to simplify tracking those resources and applying policies to manage resources at the resource group level

This article will discuss how you can use this feature through the DevTest Lab Azure portal or using automation.

Using Azure DevTest Lab portal

As a lab owner you can configure this setting for your lab by going to Configuration and policies, Lab settings, and Resource Group allocation for virtual machines.

Screenshot of Resource Group allocation for virtual machines

The setting will be defaulted to the existing behavior i.e. no change in the resource group allocation. You can choose to continue with the existing behavior or select the option to have all machines created in one resource group going forward. If you select the latter, you have two options:

1. Select an existing resource group from a pre-populated dropdown of resource groups you have access to.

Screenshot of exsiting resource groups from a pre-populated dropdown menu

2. Enter a new resource group that the service will create on your behalf for virtual machines to be created in going forward.

Screenshot of entering a new resource group

Using automation

You can also use a script to either specify a new or existing resource group within your Azure subscription for all your lab VMs to be created in. Now let’s walk through the options you have as a lab owner while using this API:

  • You can choose the lab’s resource group for all VMs to be created in going forward.
  • You can choose an existing resource group other than the lab’s resource group for all VMs to be created in going forward.
  • You can enter a new resource group name for all VMs to be created in going forward.
  • You can also continue with the existing behavior.

This setting will apply to new VMs created in the lab. This means older VMs in your lab that are created in their own resource groups will continue to remain unaffected. ARM environments created in your lab will continue to remain in their own resource groups and will not be affected by any option you select while working with this feature.

You can also learn more about how to use this feature along with an example script by visiting our documentation, “Specify a resource group for lab virtual machines in Azure DevTest Labs.” We hope you find this feature useful!

Got an idea to make it work better for you? Submit your feedback and ideas, or vote for others at Azure DevTest Labs UserVoice forum. Have a question? Check out the answers or ask a new one at our MSDN forum.

  • Explore


    Let us know what you think of Azure and what you would like to see in the future.


    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.


    Explore Azure learning