Custom Image Factory with Azure DevTest Labs

Play Custom Image Factory with Azure DevTest Labs
Sign in to queue


What is an image factory? How can it help get VMs ready faster? Simply speaking, An image factory is a configuration-as-code solution that builds and distributes images automatically on a regular basis with all the desired configurations baked in. The images in the image factory are always up-to-date, and the ongoing maintenance is almost zero once the whole process is automated. And, because all the required configuration has been baked into the image, it saves the time from manually configuring the system after a VM has been created with the base OS.

The big accelerator to get a Dev Desktop to a 'ready' state in DevTest Labs is using custom images. The downside of custom images is that there's something 'extra' to maintain in the lab (trial versions of products expire over time, newly released security updates aren't applied, etc) forcing us to refresh the custom image periodically. With an image factory, we have a definition of the image checked in to source code control and have an automated process to produce custom images based on the definition.

The solution we've implemented enables the speed of creating Virtual Machines from custom images while eliminating additional ongoing maintenance costs. With this, we can automatically cook up custom images, distribute them to other DevTest Labs and retire the old images. In this video you'll learn about the image factory, how it's implemented with DevTest Labs.  All the Azure Powershell scripts are freely available and located here:



Right click to download this episode

The Discussion

  • User profile image

    I tried this method to create member VMs for my Domain controller on Azure DevTest lab and it did not work. When I spawn multiple member VMs with the same custom image (non-sysprep'd), the hostname/computer name of the VM would be same for all machines (although the VM names are different). I may need around ten or more similar capacity member machines and I could use ten different custom images with same specs and settings but that would incur a huge cost for the storage.
    How can I just use one custom image and have multiple VMs spawn having unique hostnames?

Add Your 2 Cents