Blog Post

Azure Virtual Desktop Blog
3 MIN READ

Announcing the public preview of Azure Virtual Desktop Custom Image Templates

TomHickling's avatar
TomHickling
Icon for Microsoft rankMicrosoft
May 09, 2023

Today I am pleased to announce the public preview of a new feature in Azure Virtual Desktop called Custom image templates.

 

Custom image templates allows admins to build a custom “golden image” with the added capability to include Azure Virtual Desktop built-in customizations as well as your own customization scripts to install other applications or set of configurations.

This feature is a wrapper for the Azure Image Builder (AIB) service. It takes the elements that you want to include in your build, and ships it to the AIB service which builds the image including any additional customizations you have either selected from the AVD built in customizations or those of your own. AIB will then distribute the resulting image to either a managed image or to the Azure Compute Gallery which supports capabilities such as automated versioning and image replication across any Azure region.

 

 

 

We have created a number of "built-in" customizations that you can easily select to include into your image. These cover typical installations and configurations used in golden images for which you would need to write your own PowerShell scripts to configure if using other tooling to create images. This saves you time as we have automated these installations and configurations for you.
These cover but are not limited to:

  • Installing Language packs
  • Installing FSLogix
  • Installing Teams and configuring optimizations
  • Installing and configuring multimedia redirection
  • Configuring Screen capture protection
  • Configuring session timeouts
  • Configuring RDP Shortpath
  • Installing any outstanding Windows updates.

This list will grow as we add additional items.

 

Once this golden image has been created you can then create a host pool from this image.

You can also use any existing tooling to use this image and update your existing session hosts within a host pool.

 

As this feature uses Azure Image Builder behind the scenes it is recommended that you familiarize yourself with this capability.

 

This is our first entry into features offering image management capabilities natively within Azure Virtual Desktop. Expect many improvements and future enhancements to this service in the future. We are planning to add features that would enable automated scheduled recurring image creation, integration with App stores to install applications into the image and many others.

 

The Custom image template documentation is available here.

 

Also check out this new video from the Azure Academy 

Entitled "The AVD Admins Super Power!!!" it walks you through the process of using Custom image templates.

 

As this feature is in preview we recommend you use this for testing purposes as we continue to make improvements and fixes.

We are aware of a couple of small known issues which will be resolved shortly. The first is that Windows Updates are not applying for Windows 11 OS images and setting the time zone in the "Set default OS language" customization is not working. Please use the "Timezone redirection" customization in the Other scripts section instead, which will ultimately replace this one.

 

We hope that you will try out this new feature to alleviate the burden of managing a complicated manual image creation process.

Please provide any feedback in the Azure Virtual Desktop feedback portal using the  idea label: "Custom image templates"

Updated May 09, 2023
Version 2.0
  • OrvisLuck's avatar
    OrvisLuck
    Copper Contributor

    This is a welcome addition to the AVD deployment process.  

     

    One issue we've run into when testing it out - the custom image template build itself fails immediately if we try to use our own scripts.  Without any logs or additional details (other than the "Failed" message itself), I don't know what part of our custom scripts is causing it to fail.  The template creation process is successful when we only use the built-in scripts... it only fails when we try to add our own scripts.

     

    Have you had anyone else report this issue, and if so, are there any requirements for using your own scripts that need to be met in order to use our own?  Maybe some language, preamble, etc. in the script that is required?  Thank you!

  • Jhope188's avatar
    Jhope188
    Copper Contributor

    We tested this as it’s a great addition to the stack and much simpler than using Aib with a CD pipeline. However we are finding that it uses a newer API causing issues with our AVD bicep code. When we create an image with this and then try and deploy through Bicep calling the new image version from gallery it fails. Any idea if MS is aware and looking at this? 

  • KEmam's avatar
    KEmam
    Copper Contributor

    Excellent Work Microsoft Team !!

    We have been using Azure DevOps for quite sometime and integrating this feature into Azure Portal makes it much easier.

    I tried to use the new custom templates and ran into an issue :

    Scheduled Tasks and Default User Settings are not getting applied when Windows optimization is selected from the portal .

    Checking the online optimization Script , I can see two entries that might need to be modified if I am looking in the right place :

    Scheduled Tasks : Looks like there is  AVD-AIB Text before convertfrom-Json

    Default User Settings : The link for 2004 points to DefaultUserSettings.json but the link for 2009 points to ScheduledTasks.json

     

     

     

     

  • KartikDogra's avatar
    KartikDogra
    Copper Contributor

    Hi TomHickling ,

     

    This was actually a new Vnet created from scratch with subnet and no other service was used on this Vnet. No private endpoint, no NSG. Still was getting this error and I was myself confused as why it is asking me to disable private link when no such thing is present in Vnet. have tried this by creating vnet multiple times but every time received the same message.

     

     

  • KartikDogra's avatar
    KartikDogra
    Copper Contributor

    Hi,

     

    Have tried using Custom image template with and without Vnet.

    without Vnet template was working fine, but with Vnet it always gives an error message saying the private link service needs to be disabled on the vnet even though there are no Private link services is enabled on Vnets.