Creating RDSH Automatic Instant Clone Farms
Home > VMWare platform > VMWare Horizon > Creating RDSH Automatic Instant Clone Farms
Theory
In case of Desktop OS pools with dedicated VM per user we can create the pool directly using Golden images as explained at Creating Windows 2019 or Windows 10 Desktop Pool. However in case of RDSH shared desktop pools using Windows server OS where a single VM can be used by multiple users concurrently, we need to first create a farm of RDS hosts. Then these farm of RDS hosts can help in building the required desktop pool.
There are two types of farms:
- Manual
- In this case we create the required VMs that will be used by users as shared desktop and we add them to the pool manually. In this case we should ensure all Farm machines are joined to domain properly.
- Automated
- In this case we create golden image for RDSH as explained at Creating Golden image for Windows OS. Then Horizon creates farm of RDS hosts using this golden image automatically. This is better in long run so that we can update all hosts in farm from a single central image. However in this case users should not store any data locally on the farm VMs as these VMs will get destroyed on image update. All data should be stored on remote file shares only.
Pre-requisites
- There should be a DHCP from same AD running in golden image or desired network where RDSH automated farm VM would be created
- If DHCP is not there we will get error:
- Error during Provisioning Initial publish failed: Fault type is AGENT_CUSTOMIZATION_FAULT - Internal template vm-40 customization failed. Error description not set by agent
- Refer: https://communities.vmware.com/t5/Horizon-Desktops-and-Apps/error-during-Provisioning-initial-publish-failed/td-p/1857285
- If DHCP is not there we will get error:
- Appropriate golden image with snapshot should be created as per Creating Golden image for Windows OS for a Windows Server OS.
- Connection server should have been deployed and integrated with AD and domain as per Horizon Connection server installation
- Required AD policies should have been configured as per AD Configuration required for various Windows RDSH or Desktop pools
Create RDS Farm
To create RDS farm use below steps:
- In Horizon Console, on the left, expand Inventory, and click Farms.
- On the right, click Add.
- In popup window, select Automated Farm, and click Next.
- In the vCenter Server page, select Instant Clone, select the vCenter Server, and then click Next
- In the Storage Optimization page, click Next.
- In Identification and settings page,
- Enter a name for the Farm. A VM sub-folder with the same name will be created in vCenter.
- Leave defaults for empty session timeout, action when timeout occurs and log off disconnection sessions, etc.
- Click next
- On Load Balancing Settings page, Set connecting session threshold as 20. Leave others as 0. Click next.
- In the Provisioning Settings page, enter following
- Naming Pattern
- Desired pattern such as Win2019R-{n:fixed=4}
- Maximum machines
- At any point the automation will not create more machines than this.
- Minimum no of Ready provisioned machines
- At any point minimum these many machines would be there even if there is very less load.
- Click next
- In the vCenter Settings page, Choose
- Golden Image in vCenter
- Snapshot
- VM Folder Location (Need to create one folder in vCenter). A sub-folder under this will get created as per pool name.
- Select Cluster, Resource Pool and Datastores
- In case of Network leave default golden image network, if that is desired. Otherwise choose appropriate network
- In either case there should be DHCP service from AD in this network for VDI to work
- In the Guest Customization page
- From dropdown, select the domain
- Select an OU to place the new virtual machines. Select the VDI-VMs sub-OU created as per AD Configuration required for various Windows RDSH or Desktop pools.
- Select Allow reuse of pre-existing computer accounts
- Click next
- In the Ready to Complete page, Review the settings, click Submit
- To view the status of RDS Farm creation go to Inventory -> Farms -> Click the farm name.
- The bottom of the Summary tab shows you the State of the Publishing progress
- You can also watch the progress in vSphere Client. It goes through a couple longer tasks, including cloning the snapshot, and creating a digest file.
- Eventually the tab named RDS Hosts will show the new virtual machines.
- Once the RDS Hosts are created, you publish resources from them by creating a Desktop Pool.
Publish Desktop pool from RDSH farm
Once RDS hosts are created Publish Desktop using:
- In Horizon Console, Go to Inventory -> Desktops.
- On the right, click Add.
- In the Type page, select RDS Desktop Pool, and click Next
- In the Desktop Pool ID page, enter an ID and name. Click Next.
- In the Desktop Pool Settings page click next
- In the Select an RDS farm page, select a instant clone auto farm, and click Next.
- In the Ready to Complete page, check the box next to Entitle users after this wizard finishes, and click Submit.
- In the Entitlements window, click Add. Browse to an Active Directory group created to have access to this desktop pool. Click OK.
- Go to Inventory > Farms, click your farm name, there will be a RDS Pools tab, where you can see which Desktop Pool is associated with this farm. An RDS Farm can only belong to one Desktop Pool.
Acess the RDP pool
To access the RDS Desktop pool created on top of RDS farm use:
- Go to https://<connection-server>/portal, choose "HTML Access" and login with the AD user who has been given access to pool.
- OR Install Horizon Desktop client and give details of connection server. Accept the certificate. Then login with AD user who has been given access to pool.
Add more hosts to RDS farm
We can add more hosts to farm by editing existing Farm and changing Maximum no. of machines configured under provisioning settings.
Update automated farm
We can update automated farm using:
- Power on the golden image VM and make required changes eg Windows update.
- After making your changes, shut down the master session host.
- Right-click the virtual machine, and take snapshot. You must create a new snapshot
- Remove older snapshots. Right-click the master VM, and click Manage Snapshots. Delete older snapshots.
- In Horizon Console, go to Inventory > Farms.
- Click the farm name link.
- On the Summary tab, click Maintain, and then click Schedule.
- In Maintenance tab,
- One option is to schedule Recurring reboots, which revert the RDS Hosts to a clean state.
- To push out an updated Master Image, change the Schedule to Immediate.
- Select Start Now, or select Start at a future date/time. Click Next.
- For Recurring Maintenance Configuration, Repeat Interval set to required time period
- In the Image page, uncheck the box next to Use current golden image, select the new snapshot, and click Next.
- In the Scheduling page, decide if the reboot should wait for users to logoff or force them off and then click Next.
- In the Ready to Complete page, click Finish.
- The RDS Farm Summary tab (scroll down) shows you that its publishing the new image.
- After the image is published, on the RDS Hosts tab, you can check on the status of the maintenance task.
Install clone maintenance
For Instant Clones regular Maintenance use:
- Instant Clones RDS Farm
- Switch to the RDS Hosts tab, you can select a machine, and then click Recover, this causes the VM to be deleted and recreated, thus reverting to the master image snapshot.
- On the Summary tab of the RDS Farm, you can click Maintain > Schedule to schedule a reboot of every VM in the RDS Farm. Rebooting causes the VMs to revert to the master image snapshot.
- Specify how often you want the reboot to occur, and then click Next.
- In the Image page, you dont have to change the snapshot. Click Next.
- Decide what to do about logged on users, and click Next.
- In the Ready to Complete page, click Finish.
- If you click the Maintain menu again, you can click Reschedule to change when the reboots are scheduled. Or click Cancel.
- If you click Schedule again, you can only schedule a one-time update, typically to replace the master image snapshot used by the RDS Farm.
- ESXi hosts running Instant Clones can be placed into maintenance mode without any special instructions.
Ref:
Home > VMWare platform > VMWare Horizon > Creating RDSH Automatic Instant Clone Farms