1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Managing Azure Virtual Desktop Session Host Images

Image Capture

Contents

keyboard_tab
Course Introduction
1
Introduction
PREVIEW1m 57s
Imaging Basics
2
3
Sysprep
1m 44s
4
Snapshots
4m 53s
Session Hosts and Images
Course Conclusion
Start course
Overview
Difficulty
Intermediate
Duration
43m
Students
90
Ratings
5/5
starstarstarstarstar
Description

This course covers imaging in Azure to show you how you can build Azure Virtual Desktop session hosts as well as prepare for the AVD Specialty exam. This is going to cover a lot of information on the Windows OS, imaging tools, and how we work with images in Azure. Then we'll look at how to manage, maintain, and update those images. Finally, we'll cover how you can automate the whole process so you can scale as well as generate a new image each month or when a zero-day patch comes out, so you can stay secure.

Learning Objectives

  • Create a custom image
  • Deploy a session host with a custom image
  • Modify a session host image
  • Install language packs
  • Plan for image update and management
  • Create and use Azure Compute Gallery image
  • Automate custom images with Azure Image Builder

Intended Audience

  • Azure administrators with subject matter expertise in planning, delivering, and managing virtual desktop experiences and remote apps, for any device, on Azure
  • Anyone looking to learn more about Azure Virtual Desktop

Prerequisites

  • Windows operating system
  • Imaging a Windows OS
  • Azure Virtual Machines
  • VM snapshots
  • Azure Compute Gallery 
  • Azure Image Builder
Transcript

With our image customization completed successfully, and after testing, we'll find that our VM is still good, and we're ready to start the capture process. So how do we do this in Azure? Well, once all your applications and customizations are set up on your VM and you have snapshots for safety's sake at every step, you can run Sysprep, which will shut down the VM. And then we'll go to the Azure Portal. Inside the virtual machine, at the top, you'll see a capture button. This will save the generalized VM's OS disc as an image resource, which can be either standalone, as a managed image, or an image in the Azure Compute Gallery.

A managed image is a standalone resource that you can deploy VMs from, but it is missing some key features that I'll show you in a minute. The only real options you have to set are if you want zone resiliency or not, which can be valuable if you work in availability zones. However, the preferred path is to use the Azure Compute Gallery. This gives you additional abilities to replicate the image in a single region or across multiple regions, subscriptions, and even across Azure Active Directory Tenants.

Next, you have the option to automatically delete the source VM after this is created. This is normally what I'd recommend, because once Sysprep'd, there's no way to get back inside the Windows operating system. If I needed to go back to the VM, for some reason, I would go and recover from my snapshot. In the Gallery Details section, you can select your Azure Compute Gallery, or create a new one. And since you've Sysprep'd your VM already, you'll see the note that your virtual machine has been generalized.

The final section are the image details that will be stored in the Gallery, including the image definition, which is a container for your versions to go into. And if you don't have one, click to create a new one, and give it a name. Then we have our version number. This pattern is for major versions, minor versions, and patch versions. So you need something like 15.35.6. Then we have the checkbox to Exclude from Latest.

Now, why would you wanna do that? If you're creating a new image version, but are not ready to release it for general deployment, excluding will give you a chance to test privately without interfering with any new deployments that are going on. Once your testing is complete, and you are ready to promote the image, you can go into the Gallery and remove the check so the next deployments will use your latest version. The End of Life Date is metadata for your reference. It does not directly impact when the image is or is not usable. It's just an optional internal reference for your benefit.

Finally, we have the Replication Section. Now your images are extremely important for your ability to scale. A custom image in Azure is limited to deploying 20 virtual machines simultaneously. The way you can scale beyond that is by using the Gallery to create multiple replicas of your image in a single region which can enable you to deploy up to 1000 VMs at once.

Now, before you start thinking about deploying 1000 VMs at the same time there are many other factors that impact your scale of your VM's deployments like availability zones, availability sets, as well as subscription, quotas and Azure API limits. So just be sure you know all those details and you can plan your deployments accordingly. Our default replica count here is one. This number can be increased to 50, allowing for 1000 VMs to be deployed. Then we have the target regions for the image to be replicated in as well as the storage account type.

For the type, I always recommend using standard hard disc drives with LRS, which stands for a Locally Redundant Storage. This is the lowest cost option to store your images and does not impact the deployment time. As for the target region, this allows you to scale out your image across the world using the default replica count. However, because image capture and replication processes are handled as one work item, I recommend only creating one image replica in a single region. This will allow the image process to finish as fast as possible, which means you can start testing as soon as possible to know if your image is good or if you need to revert back to a snapshot and start troubleshooting.

Once the image process is complete. I'll show you where you can go in the Azure Compute Gallery to increase your replica accounts. Click next and add your tags like we did for our other resources. And when you're ready, create your image.

About the Author
Avatar
Dean Cefola
Principal Azure Engineer
Students
174
Courses
3

Dean Cefola is a Principal Azure Engineer at Microsoft and has worked in the IT industry for over 20 years. Dean has been supporting Azure Virtual Desktop from the beginning and is the Microsoft FastTrack Global Leader for AVD.