Table of Contents
Each host pool consists of multiple session hosts, running as virtual machines in Azure and registered to the Windows Virtual Desktop service. Each host pool also consists of one or more app groups that are used to publish remote desktop and remote application resources to users. Creating host pool can be with predefined image from azure marketplace or using Shared Image Gallery repository.
Organizations use Custom Images to implement their security controls and configurations, pre-install their IT applications for users. After creating a custom image there are updates and application requirement which will require image update and changes.
To update the custom image, we have to create a disk with the snapshot (before Sysprep) to be our source for the next image update. Then we can create a new VM from using created disk.
Step 1: Create a managed disk from previous created Snapshot
Open Create a managed disk blade
- Subscription: Select the subscription where the new disk will be created.
- Resource group: Create a new resource group or use an existing one.
- Disk name: Enter a name for the Restored Disk
- Region: Select the (Region) where you want to create the host pool.
- Availability Zone: (1,2,3)
- Source Type: Select the snapshot created in previous article (Azure Shared Image Gallery and Windows Virtual Desktop)
- Disk Size: Select Disk Size for the OS Disk.
Click Review + create
Step 2: Create VM from the created Managed Disk
Now new Managed Disk have been created, its time to create a VM from the created Managed Disk.
Click Go to resource
Then Click Create VM
- Subscription: Select the subscription where the new disk will be created.
- Resource group: Create a new resource group or use an existing one.
- Virtual machine name: Enter a name for the Restored Master virtual machine (Ex. Az-WVD-MTR-02)
- Region: Select the (Region) where you want to create the host pool.
- Availability Zone: (1,2,3)
- Source Type: Select the snapshot created in previous article (Azure Shared Image Gallery and Windows Virtual Desktop)
- Size: Select VM Size (Ex. D2s_V3)
- License Type: Windows Client
Under Inbound port rules, choose Allow selected ports and then select RDP (3389) from the drop-down.
Leave the Default Setting for the Disk
Click Next: Networking and Set your Network Configuration.
Click Next: Management
Set Boot diagnostics to off
Click Next: Tags
Set Your Tags and click Review + create
Last review your Virtual Machine Configuration and Click Create to Create
Step 3: Connect to virtual machine
Deployment complete, lets login to the VM and start our customization.
- Click Go to resource
- Select the Connect button on the overview page for your virtual machine.
- In the Connect to virtual machine page, keep the default options to connect by IP address, over port 3389, and click Download RDP file.
- Open the downloaded RDP file and click Connect when prompted.
Step 4: Make a disk Snapshot and VM Capture
After completing our changes and customization on the newly created Master Virtual Machine, we have to create a snapshot by repeating:
Step 5: Versioning and grouping of images for easier management.
After capture the VM would be better to Add a new version to the image in the Shared Image Gallery
- Open
Shared image galleries blade
and
Click on the created SIG for WVD
- Select the custom image created earlier
- Click on Add Version
- Subscription: Select the subscription where the new disk will be created.
- Resource group: Create a new resource group or use an existing one.
- Region: Select the (Region) where you want to create the image version.
- Name (version number): allowed characters are digit and period. (Ex 0.0.1, 15.35.0)
- Source Type: Select Managed Image
- Source Image: Select the Master Image that we just created using Step 3 (Creating a Virtual Machine Capture)
Click Review + create
Step 6: Update WVD Host pool with the new Golden Image Version
Right now, there is no street forward update for the current hostpool session host with the new golden image version, hence we would have to create a new session host which will create new VMs (hosts) with the new image version and moving all users from current session to the new one by enabling drain mode on the old one (remote logons for new users are disabled. Users with an existing session may reconnect (in order to save their work and logoff). Users without an existing session are prevented from logging on)
Create a new session host
- Open
Windows Virtual Desktop | Host pools blade - Select your Host pool
- Click on Session Hosts
- Click on Add to add the new servers.
- We have to generate A registration key before adding a new VM to host pool
- After generate registration key lets add a new host.
- Resource group: Create a new resource group or use an existing one.
- Number of VMs: Enter the required number of VMs for the hostpool
- For the rest of configuration please refer to previous steps in this
article (Deploy a Windows Virtual Desktop Host pool with the custom image)
- Click Create
Delete the old servers
Now we have a new host pool session host with the latest version on the created Golden image for WVD.
Last Step is Removing old session host by enabling drain mode on the old ones then deleting old server after confirming that no user are connected to as well as verify session host pool functionality.
NOTES: Once enabling drain mode
- Remote logons for new users are disabled
- Users with an existing session may reconnect (in order to save their work and logoff).
- Users without an existing session are prevented from logging on
Check out my Udemy course for AZ-140 Azure Virtual Desktop
Use This link for 80% OFF