Azure DevTest Labs – First impressions

I’ve written a couple of blog posts in the past about scheduling Azure VMs to turn off at a certain time of day. I use this functionality to ensure I don’t use all of my MSDN credit while carrying out testing on Azure.

Microsoft have recently announced a new solution that will help address this challenge, the solution is called Azure DevTest Labs. You can sign up to the preview of here: .

Once enrolled in the preview DevTest labs can also be created by searching in the Azure marketplace by searching for “DevTest”:

The focus on Azure DevTest Labs seems to be to provide development teams with an environment that they can easily deploy preexisting VM templates to without the risk of running up high Azure bills. I ran through creating a DevTest Lab and creating a VM, my experiences follow…

Creating a DevTest Lab

When you create your DevTest Lab you are required to enter the following details:

  • Lab Name
    No spaces allowed
  • Subscription
  • The credit used by services within your lab will be taken from this subscription.
  • Location
    The Azure region for the DevTest lab – it seems that in preview only certain regions are available.
  • Auto Shutdown
    Immediately at the point of creating the DevTest lab we able to specify a time of day that all VMs in the lab will be turned off, and hence the compute charges will cease. Given that I often work late I set this to 4am.

Configuring Policies

Once the DevTest Lab has been created there a number of configurable settings. The first thing to configure is the Policies for the lab. At present there are four options, but only two are currently functional:

  • Max VMs per User
    One of the key features of a DevTest lab is that multiple user can be granted access to the lab using Role Based Access Control. This policy limits the number of VMs each user can have in the lab.
  • Auto Shutdown

    As specified when the lab was created, if I decide there is never any chance that I will be working until 4am I could come back here and change the time.

The two policies that are currently unavailable are Cost Thresholds and Allowed VM Sizes. I can see the cost threshold feature being very useful especially if multiple users are adding resources to the lab.

Creating VMs from Templates

From my initial investigations it seems that we can only create VMs from Templates that exist within the
lab. It would be useful to be able to add any service from the Marketplace, maybe that will come later. There are a number of templates pre-created when the lab is created. They can be seen below:

New templates can be created from existing VM OS disks that have had SysPrep or uploaded using the PowerShell provided.

Rather than create my own image to save time I created a VM using the Windows Server 2012 R2 Datacenter Template:

One thing to note is it is possible to add artifacts to the VM from a Git repository. I’m reasonably new to Git and will explore this function at a later date!

My first attempt at creating a VM failed. The error was pretty generic:

I dug a but deeper into the logs of the VM that failed creation and found the issues was creating a public IP address. It seems the VM name is also being used to name the public IP. As there is already a public IP on Azure called “” the VM creation failed.

I retried creating the VM, but used a slightly more complex VM name (added “marcusr” to the end). Success!

You can see from the screenshot above that the VM configuration is automatically generated. A Virtual Network has been created automatically along with IP address configuration, and there was no choice over storage configuration. I’d like to have had a bit more choice.

This is a preview service and hasn’t been around long, it clearly still has a way to go. I can foresee in the future the ability to deploy an Azure Resource Manager JSON template to a DevTest lab, which would definitely give more flexibility.

Having thought about things further, it would have been been easier if I could just add existing (or create new) resource groups into the DevTest lab. That way the virtual machine creation process doesn’t need rewriting inside the lab area of the portal, and this would allow other services to exist in the lab and be controlled by policies such as Cost Thresholds. I look forward to seeing how DevTest labs develops in the future and will definitely be using it to help control my spending when testing on Azure.

1 Comment

  1. Xiaoying Guo

    Hi Marcus,

    I’m the PM for Azure DevTest Lab and happen to see this pose :). Thanks for trying it and sharing the details about your experience with this great post! You mentioned about the Public IP address conflict. Does it still happen to you today? My team has made a change a while ago to address this issue. If you still see it happens to me, please let me know.

    I also want to learn more your feedback at the end of the post. Is the ARM template that you want to use to the Lab the same as what you use when provision a VM outside of Lab in Azure? By any chance, please feel free to drop me an email, and I’d love to learn more from you about your experience, needs and comments.

    Xiaoying Guo
    Sr. Program Manager, Microsoft Azure DevTest Lab.


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.