Configuration Manager + Azure Lab Services
Published Oct 08 2020 08:00 AM 4,019 Views

A question that we get asked by IT departments is whether Configuration Manager can be used to set up your lab.  The answer is yes!  In this blog post, we will show how you can use Microsoft Endpoint Manager Configuration Manager, which is the new brand name for SCCM, to automatically deploy software to a lab’s template VM.


IMPORTANT: It's important that when you move from a physical lab environment to Azure Labs, that you also restructure images instead of reusing images from your physical environment.  Refer to the following blog post that has more details: Moving from a Physical Lab to Azure Lab Services



Recommended Approach

To use Configuration Manager with Azure Lab Services, here is the approach that we recommend:


1. Start with a Windows marketplace image when you create your lab.

Custom images that are created by exporting from a lab’s template VM are specialized images which means that SysPrep has not been run on the image.  As a result, all VMs that are created from a custom image will have the same Windows SID.  Configuration Manager requires that each VM have a unique SID for its features to work properly.  To ensure that your template VM has a unique SID, we recommend that you start with a Windows image from the marketplace when you create the lab.


2. Use Configuration Manager to deploy software to the template VM.

You should use Configuration Manager to deploy software to the template VMnot to deploy software directly to the student VMs.  There are a couple of reasons for this:

  • The template VM should serve as the ‘master’ image for all of the student VMs in the lab.
  • When the student VMs are published, they all have the same SID as the template VM.  Configuration Manager’s features won’t work properly because the student VMs do not have unique SIDs.


These steps assume the following prerequisites have been configured:

  1. You already have a Configuration Manager site server installed. 
  2. You have a Lab Account that is peered with a Virtual Network (VNet) that has access to your Configuration Manager site server.  By peering your Lab Account, this will enable its lab VMs to communicate with the site server.  More information on Lab Account creation and VNet peering can be found in this article:

IMPORTANT: The lab account must be peered to the VNet before the lab is created.  You may also need to ensure that required ports are enabled within your VNet and\or on-premise network.  For example, you need to allow HTTP\HTTPS communication between your lab VMs and the Configure Manager site server.  Refer to the following link for details: Ports used in Configuration Manager

Lab Setup

Let’s look at the steps to set up your lab to use Configuration Manager to deploy software to the template VM.


1. Create lab

Create a new lab using a Windows marketplace image.


2. Install the Configuration Manager client onto the template VM

You have several options for installing Configuration Manager’s client onto the template VMThe simplest option is to manually install Configuration Manager’s clientOnce the template VM has the client installed and is assigned to a site, you may need to manually approve the template VM in Configuration Manager’s console.



3. Deploy software applications using Configuration Manager

 Once the template VM is approved in Configuration Manager, you can use Configuration Manager to deploy software applications onto the template VM.  Read the following instructions for details:

4. Uninstall Configuration Manager’s client

Before you publish the template VM, you should uninstall Configuration Manager’s client.  Otherwise, if you leave the Configuration Manager client installed when you publish, this will potentially cause negative side-effects because the student VMs will be assigned to a site yet will have non-unique SIDs.


5. Publish the template VM

Finally, you can publish the template VM as you normally would to create the student VMs.

A Few Considerations with Active Directory Domain Joining

In addition to using Configuration Manager to set up your template VM, you may also be planning to join your student VMs to your AD domain as shown in a previous blog post.  There are a few things to note if you are planning to do both in your lab.


First, when you:

  • Domain join your student VMs.
  • And you use Configuration Manager’s AD discovery methods to automatically discover client computers in your domain.

You will likely see your student VMs listed in Configuration Manager’s console.  However, you should not use Configuration Manager to manage the student VMs due to the reasons already mentioned in this post.


Secondly, you may choose other options for installing the Configuration Manager client on the template VM, such as a client push installation, where you also need to use AD discovery.  Here are a few helpful tips for using AD discovery to find your lab’s template VM:

  • You will need to manually join the template VM to your domain. 
  • After you’ve finished installing the Configuration Manager client and deploying applications to the template VM, then make sure that you remove the template VM from the domain.  Otherwise, if the template VM remains joined to the domain, this will cause an issue later when you use the steps for joining student VMs to the domain.

Wrap Up

For IT departments that are already using Configuration Manager for managing devices, we hope that you find this guidance useful for also using Configuration Manager to prepare your lab's template VM.

Version history
Last update:
‎Oct 08 2020 08:00 AM
Updated by: