Rebuild Horizon POD

Sometimes it happens that your POD get out of sync or that your ADAM database gets corrupted. Then you might need to rebuild your Horizon POD, it sounds like a big deal but it’s not so hard. Let’s start to rebuild Horizon POD.

Introduction

This how-to have been tested and known to work, but not limited to the following versions

  • Horizon 8

Prerequisite

  • Administration permissions to Horizon View
  • Local administration rights to all Connection Servers
  • Installation file for VMWare Horizon (You can find link below)
  • If your using UAG then you need permission to set them in Quiesce Mode

Good to know

After you have reinstalled your connection servers the configuration that you have made in Horizon View administration web portal will be deleted for that specific connection server.
Files and settings that not going to be deleted by itself on your connection server are the following, but it might be other files and settings that are not deleted as well:

  • portal-links-html-access.properties
  • locked.properties

Choose which connection server to keep

  • Before we start you need to choose which connection server that we should rebuild the POD and make that connection server schema master.

  • RDP to the connection server you have chosen to keep

  • Open CMD as Administrator

  • To make this connection server the schema master enter the command below, you will get the question if you’re sure so enter Yes to continue, for some reason Y won’t work so you must enter Yes

    vdmadmin -X -seizeSchemaMaster
    

  • It can also be a good idea to make sure that you don’t remove the cloud pod schema master, to move the cloud pod schema master role enter

    vdmadmin -X -seizeSchemaMaster -global
    

  • We also need to seize naming master, for some reason Horizon don’t have that function in vdmadmin.

  • Open CMD as administrator

  • Write the following commands and press enter after each command, when you see a pop up like the one below you should click on Yes. And remember to replace SERVERNAME with your servers name for example cs01

    dsmgmt
    
    roles
    
    connections
    
    connect to server SERVERNAME:389
    
    quit
    
    seize naming master
    
  • Now it’s done, see picture below how it should look like

Disable Pool and Provisioning

If you have multiple Horizon PODs, it’s a good idea to disable all the instant-clone pools on the Horizon POD that you’re going to rebuild.
This is not needed but it will make things easier and faster as we are going to rebuild the POD.

  • Login you Horizon View administration portal, you can do that by entering https://FQDN/admin in your web browser. Replace FQDN with the FQDN to one of your connection servers

  • Click on Desktops under Inventory in the left menu

  • Then click on one of your instant-clone pools

  • Under Summary click on Status and in the dropdown list that will appear click Disable Desktop Pool and Disable Provisioning

  • You can confirm that it has taken affect by clicking on Status again or by the banners that will appear under Summary

Now user can’t connect to this pool and the pool will not provisioning any new VMs. When a user logs out from there VM it will be destroyed and no new VM will be created. And your Global Entitlement for that pool will direct the user to your other POD.

Detect and resolving LDAP Entry Collisions, Schema Collisions, Schema Master Issue

This is not needed but it won’t hurt to do it either, so I personally think this is a good thing to do before continuing to try to resolve any kind of issues. You might already have done this before you did decide to rebuild your POD but if we have done this once more, we know that the node that we have decided to rebuild everything from are as good as we can make it. As I don’t have any LDAP entry collisions or LDAP schema collisions I didn’t need to resolve them.

  • Open CMD as Administrator

  • We can start to see if it’s any LDAP entry collisions with this command

    vdmadmin -X -collisions
    

  • If it did detect LDAP entry collisions, then you can resolve them with the following command

    vdmadmin -X -collisions -resolve
    
  • Now let’s check if it’s any LDAP schema collisions

    vdmadmin -X -schemacollisions
    

  • If you have any then resolve them with the following command

    vdmadmin -X -schemacollisions -resolve
    

Set your UAG in Quiesce Mode (optional)

I’m assuming that if you have UAG in front of your Connection Servers that you have it setup in 1:1, one UAG are paired with one Connection Server.
If you have UAG in front of your Horizon Connection Servers, it’s a good idea to drain the connections to your Horizon Connection Servers before you take them down.
What’s happening when you’re draining them is that when a user that are connected through that UAG logs out they will not connect trough that UAG again and then the user will not be disconnected in the middle of their work when you take down the Connection Server.

You need to do the following on each UAG:

  • Login to your UAGs administration web portal and select Configure Manually

  • Click on “wheel” in System Configuration under Advanced Settings

  • Scroll down and find “Quiesce Mode” and activate it

  • Scroll down some more and then click “Save”

Now when all your UAGs is in Quiesce Mode just wait the time you want before continuing.

Disable connection server

We need to disable all the connection server that we are going to remove from the POD.

  • Login to Horizon View administration web portal

  • In the left menu under Settings click on Servers

  • Then click on Connection Servers in the top menu

  • Mark the connection server you want to disable and then click on the button Disable

  • A popup will appear and ask if you’re sure that you want to disable the connection server, click OK

  • You can verify that the connection server has been disabled by looking under the column State

You can also do this by RDP in to one connection server in the POD and then open CMD and use the following command, remember to replace CONNECTION-SERVER-NAME with the name of the connection server you want to disable.

vdmadmin -Q -disable -server CONNECTION-SERVER-NAME

Uninstall and remove connection server

Now we are going to remove all connection servers beside the connection server that we have chosen to keep and made schema master. You need to do the steps below on each connection server you want to remove

  • RDP to the connection server you want to remove

  • Open Task Manager and then click on Services tab

  • Locate wsbroker then right click on wsbroker and click on stop, wait until all the services that are depending on wsbroker have stopped.

  • Go to Control Panel -> Programs and Features

  • Uninstall VMWareVMDS from the server and VMWareVDMDSG from the server if it’s existed

  • A popup will appear and ask if you’re sure, click Yes to continue

  • If you get this error, it’s because your connection server did still have connections from users when you did try to uninstall it. It’s always a good idea to stop wsbroker service before uninstalling. So, stop wsbroker and then try again

  • We also need to remove the uninstalled connection server from the configuration. RDP into the connection server you have chosen to keep.

  • Open CMD and enter the command below, replace CONNECTION_SERVER with the name of the connection server you want to remove

    vdmadmin -S -r -s CONNECTION_SERVER
    

  • Now uninstall VMWare Horizon Connection Server and VMWare Horizon HTML Access if it exists on your connection server

  • Reboot the connection server

Reinstall connection server

After you have uninstalled all the connection servers beside the one that you decided to keep, we need to install them again. We are going to install them as replication servers, to do that we need the Horizon installation file.

  • Copy the installation file to the connection server you’re going to install

  • RDP into the connection server

  • Start the installation by double click on the installation file

  • Two UAC prompts will appear, click Yes to continue

  • First step will show some information, click Next to continue

  • Then you need to accept the license agreement, check the box and click Next

  • On this page you can choose where to install Horizon if you want, click Next to continue

  • Here we are going to change some settings, Change the type of Horizon Connection Server you want to install and select “Horizon Replica Server”. You can also if you want to uncheck “Install HTML Access” if you don’t want that, but you can inactivate it later. So, no harm to install it. Click Next to continue

  • Now enter the FQDN (example cs.stolpe.io) to your connection server that you made master and then click Next

  • I do recommend that you leave “Configure Windows Firewall automatically” checked but you can choose not to configure it if you want. Click Next to continue

  • To start the installation click Install

  • When the installation procedure is finished you will see this window, click Finish

This can take some time, but don’t worry just wait. During installation and sometime after the installation Horizon View administration portal will state that it’s something wrong on the connection server. Once again just wait, this can take up to 30 minutes before it starts to work properly.

Verify when connection server is working

You can verify what health status your connection has in Horizon View administration web portal.

  • Click on System Health in the left menu, then in the middle click on View

  • Now a popup has appeared, click on Components in the left menu. Then if you’re not seeing health status of your connection servers click on Connection Server in the top menu. As you can see in my picture one of my new connection servers are showing errors but as I did write before this is nothing to worry about as it can take some time before it works correctly after reinstalling it. Just wait and refresh the page after 15-30 minutes

  • And here it is, now all my connection servers are showing green check under the column Status

I use to wait until everything looks correct in Horizon View administration portal and when everything is green, I reboot the connection server.
I always wait until the connection server is fully working before, I start to install another one.

Conclusion

Remember to do the following things when your done with the step above:

  • Disable Quiesce Mode in your UAGs if you did enable it
  • Enable your instant-clone pools
  • Enable provisioning on your instant-clone pools

Now we are finished!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.