Back in Part 4, I mentioned that Horizon required up to a few service accounts to function properly. One of these accounts is for accessing vCenter to provision and manage the virtual machines that users will connect to. The other service account will manage computer accounts within Active Directory, and this account is only required if you are using Instant Clones.
Horizon 8 utilizes a single database for storing event and auditing data generated by the platform. This database is optional, but it is highly recommended. Horizon supports running the event database on Microsoft SQL Server and Oracle, and you can find the specific supported versions in the VMware Product Interoperability Matrix. This post will cover setting up the event database on Microsoft SQL Server.
It’s important to build the Active Directory service accounts and database access accounts with the principle of least privileged access in mind. These accounts should not have more rights than they would need. So while the easy way out would be to give these accounts vCenter Administrator, Domain Administrator, and SQL Server or Oracle SysAdmin rights, it would not be a good idea as these accounts could potentially be compromised.
vCenter Service Account
The first account that needs to be created is a service account that Horizon will use for accessing vCenter. Horizon uses this account for virtual machine management tasks, including provisioning new virtual desktops and RDSH servers and performing power operations. The service account can either be an Active Directory user or a local vCenter user. When installing Horizon in an on-premises environment, I prefer to use a standard Active Directory domain user account without any additional administrator-level rights on the domain or on the vCenter server.
There are a couple of different ways to configure your Horizon environment, so the actual rights required in vCenter will vary. The specific permissions that are required can be found in the Configuring User Accounts for vCenter Access section of the Horizon documentation..
A new role will need to be created within vCenter in order to assign the appropriate permissions. To create a new role in the vCenter Web Client, you need to go to Administration –> Roles from the main page. This will bring up the roles page, and we can create a new role from here by clicking on the green plus sign.
For the purposes of this walkthrough, I’ll be setting up my service account with permissions to deploy Instant Clone desktops. These permissions will also support deploying Full Clone desktops. The permissions that need to be assigned to our new role are:
|Cryptographic Operations||Cryptographic Operations permissions are required if you use Instant Clones with virtual Trusted Platform Module Devices
Low Level File Operations
|Global||Act as vCenter Server*
Manage Custom Attributes
Set Custom Attribute
*Required for View Storage Accelerator
· Modify Cluster
|Profile Driven Storage||All Permissions Required if using VSAN or Virtual Volumes|
|Resource||Assign virtual machine to resource pool|
· All Permissions
· Device Connection
· Perform Wipe or Shrink Operations
· Power Off
· Power On
· All Permissions
· Allow Disk Access
· Clone Template
· Clone Virtual Machine
· Deploy Template
· Read Customization Specification
· All Permissions
After the role has been created, we will need to assign permissions for our vCenter Server service account to the root object in vCenter. This is the vCenter Server object at the top of the tree. To do this from the roles screen, you will need to go back to the vCenter Web Client Home screen and take the following steps:
- Select vCenter
- Select vCenter Servers under Inventory Lists
- Select the vCenter that you wish to grant permissions on
- Click on the Manage Tab
- Click Permissions
- Click the Green Plus Sign to add a new permission
- Select the role for Horizon Composer
- Add the Active Directory Domain User or local vCenter user who should be assigned the role
- Click OK.
Horizon Events Database Account
The Events Database is a repository for all events that happen within the Horizon environment. Some examples of events that are recorded in the database include logon and logoff activity, an audit trail of administrator activities, and desktop provisioning errors.
The Events Database requires a Microsoft SQL Server or Oracle database server, and it should be installed on an existing production database server. There are two parts to configuring the events database. The first part, creating the database and the database user, needs to be done in SQL Server Management Studio before the event database can be configured in Horizon Administrator. The steps for configuring Horizon to use the Events database will happen in another post.
Note: Horizon also supports sending event data off to a syslog server. This can be used in place of an events database. Configuring a syslog server is beyond the scope of this article.
When setting up a Horizon Event Database on Microsoft SQL Server, SQL Server Authentication needs to be enabled. Horizon uses JDBC, and Windows Authentication cannot be used with the event database.
To set up the database, follow these steps:
1. Open SQL Server Management Studio and log in with an account that has permissions to create users and databases.
2. Expand Security –> Logins.
3. Right-click on Logins and Select New Login…
4. Enter the SQL Login Name and Password and then click OK.
5. Expand Databases.
6. Right-click on Databases and select New Database.
7. Enter the database name. Select the database user that you created above as the database owner. Click OK to create the database.
Note: SQL Server named instances are configured to use dynamic ports. This means that SQL Server will use a new port every time the server is restarted. The events database does not support dynamic ports, so a static port will need to be configured and the SQL instance restarted prior to configuring the events database in Horizon. For instructions on how to configure a static ports in SQL Server, please see this article.
We have now created the shell of the database. It is empty now, and all of the tables will be created when we configure the event database in Horizon in a future step.
Active Directory Provisioning Account
The Active Directory Provisioning Service account is used by Horizon to manage the computer accounts that are created for Instant Clone desktops.
This account can be created as a standard domain user, and it should not have domain administrator or account operator rights – it only needs a select group of permissions on the OU (or OUs) where the virtual desktop computer accounts will be placed.
After this account has been created, you need to delegate permissions to it on the OU (or OUs) where your VDI desktops will be placed. If you use the structure like the one I outlined in Part 4, you only need to delegate permissions on the top-level OU and permission inheritance, if turned on, will apply them to any child or grandchild objects beneath it.
Note: If inheritance is not turned on, you will need to check the Apply to All Child Objects checkbox before applying the permissions.
The permissions that need to be delegated on the OU are:
- List Contents
- Read All Properties
- Write All Properties
- Create Computer Objects
- Delete Computer Objects
- Read Permissions
- Reset Password
Note: Although granting this account Domain Administrator or Account Operator permissions may seem like an easy way to grant it the permissions it needs, it will grant a number of other permissions that are not needed and could pose a security risk if that account is compromised. Only the required permissions should be granted in a production environment.
This wraps up all of the prerequisites for the environment. In the next couple of sections, I will be covering the installation and configuration of VMware Horizon.