A few months ago I wrote a blog about How to deploy Windows Virtual Desktop (Preview) and publish a Full Desktop and the Microsoft Office 365 ProPlus applications. That blog was based on a Windows Virtual Desktop Hostpool deployed with a standard Gallery Image. In this blog I will show you how to deploy a Windows Virtual Desktop Hostpool with a custom Windows 10 multi-user image with your own LOB applications installed on it.
In my next blog I will also show you how to update the master image (custom image), during the creation of the master image in this blog some steps will be taken in the preparation for the future updates.
Before you start, make sure you have your Windows Virtual Desktop (WVD) environment up and running, like described in this blog.
In this blog
This blog covers the following steps
First we need to create a “Master” virtual machine. With this VM we will create the custom (master) image, and later on, we will use this VM to apply updates on this image.
For the following steps login to the Microsoft Azure Portal.
Click the +Create a resource button and search for Microsoft Windows 10 + Office 365 ProPlus. Select Windows 10 Enterprise for Virtual Desktops Preview + Office 365 ProPlus (latest version) and click Create (if you also want Office 365 in your master image, there is also an image available without Microsoft Office 365).
Select your Subscription and click Create new resource group. I will give this resource group the name WVD-Master. Give this VM a name (in my case also WVD-Master) select your Region and the size of the VM you want to use. Scroll down.
Fill in the username and password details and select any inbound ports if you want to connect to this VM directly via the public internet. Click Next : Disks
Select Standard HDD as OS disk type. Click Advanced and set Use Managed Disk to No. Make sure that a new storage account will be created. Click Next : Networking
Select your Virtual network and Subnet and optionally a Public IP. Click Next : Management
Configure the Management of this VM the way you like. For now I will set everything to No. Click Review + create
Logon to the just created Master VM and install your Line Of Business (LOB) applications.
For this blog I have installed Google Chrome, Adobe Reader, Notepad++ and FileZilla. I also installed the latest Windows Updates. After all updates were installed I disabled the Windows Update services and applied some optimizations. In this Microsoft article you can find the settings below and some other settings to keep in mind.
For this blog I have applied the following registry keys. You can also apply these settings via a GPO.
To configure Remote Desktop Session Host – Session Time Limits, run;
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fResetBroken /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxConnectionTime /t REG_DWORD /d 10800000 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxDisconnectionTime /t REG_DWORD /d 5000 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxIdleTime /t REG_DWORD /d 10800000 /f
To Set up tome zone redirection, run;
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fEnableTimeZoneRedirection /t REG_DWORD /d 1 /f
To disable Storage Sense, run;
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" /v 01 /t REG_DWORD /d 0 /f
Shutdown the VM after you have installed all the applications and applied all the optimizations.
Now it’s time to prepare the WVD Master VM so that the OS disk can be used for a WVD Hostpool deployment. First we need make a snapshot of the disk so we can update the disk later (see my next blog). Or go back to this moment (version) for whatever reason.
Make sure the Master VM is Stopped select the VM and click Stop and Yes to deallocate the VM.
Make sure the Master VM is deallocated before you go to the next step.
Navigate to Resource groups and open the resource group of the Master VM
Open the Storage account
Open the Blob blade and double click vhds
Select the .vhd file and click Create snapshot
Make sure the snapshot is created before going to the next step. This will take a few seconds.
Once the snapshot is created, navigate to Virtual Machines and start the Master VM
Logon to the Master VM open Windows Explorer and run c:\Windows\System32\Sysprep\sysprep.exe
Select Enter System Out-of-Box Experience (OOBE) as System Cleanup Action. Enable/select Generalize and select Shutdown by the Shutdown Options. Click Ok
Once the VM has stopped, deallocate the VM via the Stop button again.
Open the Master VM and go to the Disk blade. Click the OS Disk.
Copy the VHD URI to a Notepad, we need this URL during the Hostpool deployment.
Now that the image is ready for deployment, it is time to create a WVD Hostpool with it.
Within the Microsoft Azure Portal, click the + Create a resource button and search for Windows Virtual Desktop – Provision a host pool
Fill in the new Hostpool name, Default desktop users and Subscription. Create a new Resource group (in my case this will be WVD-Desktop, I will also create a Hostpool for the applications). Select your Location and click OK
Select the Usage Profile, Total users and Virtual machine size. Fill in a Virtua machine name prefix (in my case this will be WVD-Desktop). Click OK
Select Blob storage as Image source and past in the imageURI. Select a Disk Type for the new session host(s) and fill in the UPN of the user you can use for the domain joins. Select the Virtual network and subnet (make sure that the domain controllers are reachable from this subnet). Click OK
Leave the Windows Virtual Desktop tenant group name default, fill in the Windows Virtual Desktop tenant name and the user account with the tenant owner rights. If this user has MFA enabled, then use Service principal to deploy the Hostpool. Click OK
Select I give Microsoft permission to use and share my contact information so that Microsoft or the Provider can contact me regarding this product and related products and click Create
Step 5 : Test the results
After the deployment of the Hostpool is completed we can start testing if the custom images works fine. For this test all keep it with a published Desktop and I will test it with the Remote Desktop Windows Client.
When login to the Remote Desktop client you see that the Desktop icon is displayed.
And when login to this Desktop, you see that the custom image with all the installed LOB is presented. You can also publish these applications next to the Published Desktop if you like (if you want both the Desktop and de published applications you need to create a second Hostpool).
You can read how to update this custom image in this blog.
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.