Session hosts in Azure Virtual Desktop environments are simply virtual machines that are part of a host pool and are responsible for running user desktops and apps. The images for these session hosts are most often Windows Server or Windows 10 images that have been customised to suit the purposes of the organisation. Immutable images are, quite often, the more desirable for enterprises for the standardized, consistent and secure environment they provide.

Table of Contents

Modifying Session Host Images

To start, it’s vital to understand that modifications should be made before deploying the host pool. Doing this will make it possible to use the session host images that are most suitable for the assigned users.

Modifying a session host involves a few critical steps. Here is a stepwise guide:

  • Step 1. Choose and Customize an Image
  • Azure provides several images to select from, including Windows 10, Windows 10 Enterprise Multi-session, and Windows 7 Enterprise. Enterprise IT teams can choose the image that best suits their needs and then makes necessary customisations.

    The image can be modified to include specific software, settings and configurations needed by the users or aligned with the organisational policy. It is important to note that these customisations are captured and the image is henceforth used for all new session hosts in the host pool.

  • Step 2. Create the Image
  • When deploying session hosts to a host pool in Azure Virtual Desktop, you currently have two options – an image from the Azure Gallery or a custom image.

    If you wish to use a custom image, it’s a simple guideline you follow. You need to deploy a VM in Azure from the marketplace or any source, install necessary applications, tweaks, updates and configurations, run ‘Sysprep’ and capture the image using Azure portal or Powershell. This image can then be used while deploying the session hosts.

  • Step 3. Configure the Session Hosts
  • While creating a host pool, you can select the custom image previously captured. Custom images provide flexibility and are particularly useful when deploying pooled session hosts.

    Pooled session hosts are those where the resources are not dedicated to a single user and users can connect to any random session host when they log in.

Things to Remember

While modifying a session host image is instrumental in customizing the virtual environment to your operational requirements, a few key things must be kept in mind, like:

  1. The maximum lifetime of a snapshot is 10 days.
  2. Windows 7 may require Extended Security Updates (ESUs)
  3. If you delete the source image of the snapshot, Azure automatically deletes the snapshot.

In conclusion, the ability to modify a session host image in AZ-140 Configuring and Operating Microsoft Azure Virtual Desktop is a critical skill for IT professionals. It allows for the creation of a consistent, secure and standardized environment that is adapted to the specific needs of the users and the organisation.
Proper configuration, scaling, and customization of these images will assist in managing day-to-day operations and maintaining a good user experience

Reference Concept:

  • AZ-140: Configuring and Operating Microsoft Azure Virtual Desktop, Microsoft.
  • Customize a session host image, Microsoft docs.
  • Plans, options, and recommendations for Azure Virtual Desktop session hosts, Microsoft Docs.
  • Azure Virtual Desktop environment, Microsoft Docs.
  • Creating session host images in Azure Virtual Desktop, Azure.

Practice Test

True or False: A session host can only use managed disks in Microsoft Azure Virtual Desktop.

  • True
  • False

Answer: False

Explanation: In Azure Virtual Desktop, a session host can utilize either un-managed or managed disks.

In Azure, can we directly modify the session host image?

  • Yes
  • No

Answer: No

Explanation: The session host images cannot be directly modified. We need to create a new image or modify an existing one.

Which of the following services is utilized to deploy session hosts in Azure Virtual Desktop?

  • A) Shared Image Gallery
  • B) Azure Disk Storage
  • C) Azure File Sync

Answer: A) Shared Image Gallery

Explanation: Shared Image Gallery is used to store and distribute machine images across Azure environments, which is beneficial when deploying session hosts.

True or False: Every time we modify a session host image, we need to rebuild the entire Azure Virtual Desktop environment.

  • True
  • False

Answer: False

Explanation: We do not need to rebuild the entire environment. We can simply replace the image reference in the host pool or redeploy the host pool with new session hosts using the updated image.

Which of the following options can be used to modify a session host image for Azure Virtual Desktop?

  • A) Modify the original VM and capture a new image
  • B) Modify the disk of the session host directly
  • C) Modify the image in Shared Image Gallery

Answer: A) Modify the original VM and capture a new image

Explanation: The correct method of modifying a session host image is to modify the original VM from which the image was created and capture a new image.

To modify an existing session host image, we must first create a VM from that image. True or False?

  • True
  • False

Answer: True

Explanation: In order to modify an existing image, we must first create a VM from the image, carry out the desired changes on the VM and then capture a new image.

Is it necessary to create snapshot of the VM disk before modifying an session host image in Azure Virtual Desktop?

  • Yes
  • No

Answer: No

Explanation: While it’s a good practice to make a snapshot before making changes, it’s not always necessary before modifying a session host image.

Pre-existing session hosts can be updated with changes made in the new session host image. True or False?

  • True
  • False

Answer: False

Explanation: Existing session hosts do not get modifications made in the new session host image. The updated image will only apply to future new session hosts created from this image.

Can you make changes to session host image using Azure portal?

  • Yes
  • No

Answer: No

Explanation: Images cannot be directly edited in Azure portal. The correct method to modify an image is to create a VM from the image, make necessary changes, and then capture the image again.

True or False: You can update the OS Disk of the existing session host with the new image disk.

  • True
  • False

Answer: False

Explanation: Azure doesn’t support direct replacement or modification of the OS disk of an existing VM with a new image disk. You need to create new session hosts using the updated image.

Interview Questions

What is a session host image in Azure Virtual Desktop?

A session host image in Azure Virtual Desktop is a virtual machine image that contains a pre-installed operating system, applications, settings, and data which is used to create new session host VMs.

How can you modify a session host image in Azure Virtual Desktop?

You can modify a session host image on Azure Virtual Desktop by using Azure Image Builder, manually updating and capturing the image or by using any third-party tool that automates these processes.

Where the session host images are stored in Azure Virtual Desktop?

Session host images in Azure Virtual Desktop are stored in Azure Shared Image Gallery.

Can we update session host images after they have been deployed?

Yes, updates can be applied to session host images even after they have been deployed. But, it’s a best practice to maintain a master image and apply updates to it, capturing it for future use.

What happens if you directly update a session host in Azure Virtual Desktop?

If you update a session host directly, only that specific session host will receive the updates. It will not update your master image or affect new session hosts created from the master image.

What is the purpose of Azure Image Builder Service?

Azure Image Builder Service is a service that automates the building and managing of custom images directly in Azure.

What is needed to modify a session host image with Azure Image Builder?

To modify a session host image with Azure Image Builder, you need a configuration file that targets the image and the customizations you want to make.

What are the file formats supported by Azure Shared Image Gallery?

Azure Shared Image Gallery supports VHD, VHDX, and Managed Disk formats for session host images.

Can I share a session host image across different Azure regions?

Yes, using Azure Shared Image Gallery, you can share and replicate session host images across different Azure regions.

Is it possible to automate the process of modifying a session host image?

Yes, you can use tools like Azure DevOps, Azure Image Builder, or any other third-party tool to automate the process of modifying a session host image.

What is the role of Azure Shared Image Gallery?

Azure Shared Image Gallery allows you to share your session host images with others and across Azure regions. It provides a simple way to manage, share and distribute images in Azure.

How can you ensure consistency across multiple session hosts in Azure Virtual Desktop?

By using a master image to create all session hosts, you can ensure consistency across all of them. Any changes you want to make should be made to the master image first.

What kind of images can be used to create session hosts in Azure Virtual Desktop?

You can use either a custom image or one of the provided images by Microsoft to create session hosts in Azure Virtual Desktop.

What is the benefit of using custom images for session hosts?

Custom images can be modified to include specific applications, settings, and data. This provides companies with the ability to customize their virtual desktop environment to suit their specific use-cases.

What is the difference between a gallery image and a custom image in Azure Shared Image Gallery?

A gallery image is provided by Microsoft or other publishers and cannot be modified. In contrast, a custom image is created by users and can include specific applications, settings, and data according to their needs.

Leave a Reply

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