VMware Horizon View 6 Desktop Virtualization Cookbook
上QQ阅读APP看书,第一时间看更新

Performing Horizon View Connection Server recoveries

The process to restore a Connection Server varies based on what led to the need to perform a restore.

If we are restoring all of our Connection Servers in a pod from scratch, the Composer database will need to be restored as part of the recovery process, as its contents are tied to the information in the Horizon View AD LDS database.

Getting ready

In situations where it is required to restore multiple Horizon View-related databases at once, we should use backups that were taken as closely together as is possible when performing the restore. Ideally, backup plans for all Horizon View-related components, including the VMware vCenter Server database, should coincide as closely as possible to ensure that the data shared between them is consistent. The further apart the backups are taken, the less likely it is that the contents will match when a restore is required. This could lead to issues that require the assistance of VMware support, as items within one of more of the databases might need to be removed or edited.

How to do it...

In this recipe, we will discuss the how to restore the vCenter Server and Horizon View AD LDS databases. Additionally, we will discuss the proper method for fully removing a Connection Server from an existing pod.

Restoring a single Horizon View Connection Server

Horizon View configuration settings are stored in the local AD LDS database on each Connection Server. If the Connection Server software becomes corrupt and the pod contains at least one other functioning Connection Server, we can simply uninstall and reinstall it without having to perform any additional configuration.

If a Connection Server cannot be accessed due to a hardware or software failure and we need to replace it, we must remove it from the AD LDS replication set first. The following steps should be executed from one of the remaining functioning Connection Servers in the pod. In the example, we will remove the server named viewcs02.vjason.local from the AD LDS replication set using the vdmadmin.exe utility:

  1. Navigate to the %Program Files%\VMware\VMware View\Server\tools\bin directory.
  2. Execute the vdmadmin.exe -S -r -s viewcs02.vjason.local command.

The failed Connection Server viewcs02.vjason.local has been removed from the AD LDS replica set and can now be replaced.

To restore or replace the server, simply reinstall the Connection Server software on a new server, selecting the View Replica Server option when prompted, and the software will install and the server will be joined to the existing pod. We might also choose to silently install the Horizon View Composer software using the procedure described in The sample command-line installation of a replica Horizon View Connection Server section of this chapter.

Restoring the Horizon View Connection Server AD LDS database

The Connection Server's AD LDS database can be restored using the vdmimport.exe command-line utility, which is located in the Connection Server installation drive in the %Program Files%\VMware\VMware View\Server\tools\bin directory. The utility requires administrative access to the pod, so the AD user account that is used to run it must have administrative rights. If the AD account does not have sufficient rights, errors will be displayed during the restore operation.

The Horizon View AD LDS database is not usually restored unless all the Connection Servers were lost or if the AD LDS database was found to be corrupt. If we are only having problems with a single Connection Server, we should refer to the Removing a Horizon View Connection Server section of this chapter for instructions on how to restore or remove just that server.

The restore operation requires two commands:

  1. Decrypt the AD LDS database backup titled backup.ldf to a file titled decrypted.ldf. Replace the password with the data recovery password specified during the installation of the first Connection Server or our global Horizon View recovery password if it was configured: vdmimport -d -p password -f backup.ldf > decrypted.ldf.
  2. Restore the decrypted backup: Vdmimport –f decrypted.ldf.

Once the restore is complete, the remaining Connection Servers will replicate the restored data into their local Horizon View AD LDS databases.

Note

In the event that vSphere snapshots are used to restore a Horizon View Connection Server to a previous state, the Connection Server will stop replicating its AD LDS database to other Connection Servers. In the event that we wish to retain the configuration contained within the AD LDS database on the server where the snapshot was reverted, all other Connection Servers within the same View installation will need their Connection Server software and AD LDS database uninstalled and reinstalled from scratch. Refer to the VMware Horizon View Upgrades guide (Connection Server is reverted to an earlier vSphere snapshot.

Restoring the VMware vCenter Server database

The VMware vCenter Server database is restored using the same tools that were used to perform the backup. We should consult with our database server or backup software documentation for information on how to perform the restore operation.

Refer to the VMware vSphere Installation and Setup guide (http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.vsphere.install.doc/GUID-7C9A1E23-7FCD-4295-9CB1-C932F2423C63.html) for additional information on how to restore the components of a VMware vSphere installation.

Removing a Horizon View Connection Server

The same vdmadmin.exe command should be used when we want to remove an existing Connection Server. To remove a Connection Server from our environment, perform the following steps:

  1. Open Windows' Programs and Features control panel on the target server.
  2. Uninstall the VMware View Connection Server software.
  3. Uninstall the AD LDS Instance VMwareVDMDS software.
  4. On any remaining Connection Server, execute the vdmadmin.exe command using the syntax provided in the Restoring a single Horizon View Connection Server section of this chapter. Supply the name of the server that we wish to remove in the command text.

These steps ensure that the target Connection Server has been removed from the Horizon View AD LDS database replication topology as well as the pod.

How it works...

The following table shows you the command-line options available for the vdmimport.exe utility:

When using the vdmimport.exe utility to decrypt a Horizon View AD LDS backup LDIF file, you must specify an output file using the > MyDecryptedBackupFile.ldf format at the end of the command. A sample command used to decrypt an Horizon View AD LDS backup file would be as follows:

dmimport -d -p
 "View Restore Password" -f MyEncryptedBackup.ldf > MyDecryptedBackup.ldf

With the backup file decrypted, we can now use the utility to restore it:

dmimport -f MyDecryptedBackup.ldf

Horizon View's vdmadmin.exe utility contains numerous options beyond the backup and restore operations described in this recipe. To learn about all of the options that the utility supports, either execute the utility with a /? command-line switch such as vdmadmin.exe /?, or refer to the VMware Horizon View Administration guide and section concerning vdmadmin Command Options (https://pubs.vmware.com/horizon-view-60/index.jsp#com.vmware.horizon-view.administration.doc/GUID-360099AE-E0E3-49F7-9F4D-164A2F2C49D2.html) for additional information on the different operations the utility can perform.