View Integration Modified for Horizon 7 7.3.2 VMware Horizon 7 7.
View Integration You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments about this documentation, submit your feedback to docfeedback@vmware.com VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com Copyright © 2016–2017 VMware, Inc. All rights reserved. Copyright and trademark information. VMware, Inc.
Contents View Integration 4 1 Introduction to View Integration 5 View Components 5 Integration Interfaces to View 6 2 Integrating View with the Event Database 7 Event Database Tables and Schemas Connection Broker Events Horizon Agent Events 7 10 16 View Administrator Events 16 Event Message Attributes 25 Sample Database Queries and Views 26 3 Customizing LDAP Data 29 Introduction to LDAP Configuration Data Modifying LDAP Configuration Data 29 30 4 Integrating View with Microsoft SCOM 36 S
View Integration The View Integration document describes how to integrate View™ software with third-party software such as Windows PowerShell, business intelligence reporting engines, and Microsoft System Center Operations Manager (SCOM). Intended Audience This document is intended for anyone who wants to customize or integrate software to work with View.
Introduction to View Integration 1 With View, system administrators can provision desktops and control user access to these desktops. Client software connects users to virtual machines running in VMware vSphere™, or to physical systems running within your network environment. In addition, View administrators can configure Remote Desktop Services (RDS) hosts to provide View desktop and application sessions to client devices.
View Integration View Administrator A Web application that enables View administrators to configure View Connection Server, deploy desktop and application pools, manage machines, control user authentication, initiate and examine system events, and perform analytical activities. Note View Administrator is named Horizon Administrator in Horizon 7. vCenter Server A server that acts as a central administrator for ESX/ESXi hosts that are connected on a network.
Integrating View with the Event Database 2 You can configure View to record events to a Microsoft SQL Server or Oracle database. View records events such as end-user actions, administrator actions, alerts that report system failures and errors, and statistical sampling. End-user actions include logging and starting desktop and application sessions. Administrator actions include adding entitlements and creating desktop and application pools.
View Integration Table 2‑1. Event Database Tables (Continued) Table Name Description event_data_historical Data values for all events. event_historical Metadata and search optimization data for all events. View records details about events to all the database tables. After a certain period of time has elapsed since writing an event record, View deletes the record from the event and event_data tables.
View Integration Table 2‑2. Schema for the event and event_historical Tables (Continued) Column Name Oracle Data Type SQL Server Data Type Description LUNId NVARCHAR2(512) nvarchar(512) ID of the LUN that stores the associated object. MachineId NVARCHAR2(512) nvarchar(512) ID of the associated physical or virtual machine. Module NVARCHAR2(512) nvarchar(512) View component that raised the event. For example, Admin, Broker, Tunnel, Framework, Client, or Agent.
View Integration Table 2‑3. Schema for the event_data and event_data_historical Tables (Continued) Column Name Oracle Data Type SQL Server Data Type Description TimeValue TIMESTAMP datetime Value of a date and time attribute. Type SMALLINT tinyint The data type of the attribute.
View Integration Table 2‑4.
View Integration Table 2‑4.
View Integration Table 2‑4.
View Integration Table 2‑4.
View Integration Table 2‑4.
View Integration Horizon Agent Events View Agent events report Horizon Agent-related information, such as the users who have logged in to or disconnected from a specific machine, whether Horizon Agent has shut down on a specific machine, and whether Horizon Agent has sent a start up message from a specific machine to View Connection Server. Table 2‑5.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6.
View Integration Table 2‑6. View Administrator Events (Continued) EventType Severity ModuleAndEventText ADMIN_VC_REMOVE_FAILED AUDIT_FAIL ${UserDisplayName} failed to remove VC server ${VCAddress} ADMIN_VC_REMOVED AUDIT_SUCCESS ${UserDisplayName} removed VC server ${VCAddress} Event Message Attributes ModuleAndEventText messages use certain attributes. To determine the data type for an attribute, you can examine its value in the type column in the event_data or event_data_historical table.
View Integration Table 2‑7. Attributes that ModuleAndEventText Messages Use (Continued) Attribute Name Description SVIAdminID Identifier of a QuickPrep domain. SVIAdminName Name of a QuickPrep domain. SVIDeploymentGroupID Identifier of a View Composer deployment group. SVIOperation Name of a View Composer operation. SVIParentVM Parent virtual machine in View Composer. SVIPath Path of an object in View Composer. SVISnapshot Snapshot in View Composer.
View Integration List Warning Events The following query displays all warning events from the event_historical table. CREATE VIEW warning_events AS ( SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.ModuleAndEventText FROM dbo.VE_event_historical AS ev WHERE ev.Severity = ‘WARNING’ ); List Recent Events The following query lists all recent events that are associated with the user fred in the domain MYDOM. CREATE VIEW user_fred_events AS ( SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.
View Integration The following query lists all recent events where an administrator removed a desktop pool. CREATE VIEW desktop_pool_removed_events AS ( SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue FROM dbo.VE_event_historical AS ev, dbo.VE_event_data_historical AS ed1, dbo.VE_event_data_historical AS ed2 WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND ev.EventType = ‘ADMIN_DESKTOP_REMOVED’ AND ed1.Name = ‘UserDisplayName’ AND ed2.
Customizing LDAP Data 3 You can use VMware and Microsoft command-line tools to import and export LDAP configuration data to and from View. These command-line tools import and export LDAP configuration data in LDAP Data Interchange Format (LDIF) configuration files. This feature is intended for use by advanced administrators who want to perform automatic bulk configuration operations. To create scripts to update the View configuration, use View PowerCLI.
View Integration Modifying LDAP Configuration Data You can export LDAP configuration data on a View Connection Server instance to an LDIF configuration file, modify the LDIF configuration file, and import the modified LDIF configuration file into other View Connection Server instances to perform automatic bulk configuration operations. You can obtain examples of LDIF syntax for any item of LDAP configuration data in View by examining the contents of an exported LDIF configuration file.
View Integration Defining a Desktop Pool in an LDIF Configuration File You can define a desktop pool in an LDIF configuration file and import the customized LDIF configuration file to create a large number of desktop pools.
View Integration changetype: add objectClass: top objectClass: pae-Server objectClass: pae-WinServer objectClass: pae-ThinWinServer objectClass: pae-VM cn: vm1 description: sample virtual desktop entry pae-VmSuspended:: IA== pae-OptIgnoreProcessList: 0 pae-MOID: vm-1 pae-VmState: READY pae-ServerManaged: 1 pae-SSOEnabled: 1 pae-DisplayName: virtual desktop 1 pae-TunneledConnection: 1 pae-pwdEncryption: KERB5 ipHostNumber: vm1 pae-ClientProtVersion: 1 pae-WinDomain: NULL pae-thinProto: XP_RDP pae-Services:
View Integration pae-OptSuspendTimeout: 0 pae-OptDisconnectLimitTimeout: 0 pae-OptMaximumSessions: 0 pae-Disabled: 0 # # Further Virtual Desktop VM entries as required # # # VM Pool entry Pool1 # DN: CN=Pool1,OU=Server Groups,DC=vdi,DC=vmware,DC=int changetype: add objectClass: top objectClass: pae-ServerPool cn: Pool1 pae-VCDN: CN=b180b93b-2dd3-4b58-8a81-b8534a4b7565,OU=VirtualCenter,OU=Properties,DC=vdi, DC=vmware,DC=int pae-MemberDN: CN=vm1,OU=Servers,DC=vdi,DC=vmware,DC=int pae-MemberDN: CN=vm2,OU=Serv
View Integration Use the vdmimport Command to Import LDAP Configuration Data In View 4.5 and later releases, you can use the vdmimport command to import configuration data from an LDIF configuration file into a standard or replica View Connection Server instance. By default, the vdmimport command-line utility is installed in the C:\Program Files\VMware\VMware View\Server\tools\bin directory. Prerequisites n Verify that you have View 4.5 or later.
View Integration Prerequisites Export LDAP configuration data to an LDIF configuration file. See Export LDAP Configuration Data. Procedure 1 Log in to a View Connection server instance. Option Action View 3.1 or earlier Log in as an administrator and be a member of the Local Administrators user group. View 4.5 or later Log in as a user in the Administrators role. Note You must be logged in as a user in the Administrators role to import configuration data into the View configuration repository.
Integrating View with Microsoft SCOM 4 You can use Microsoft System Center Operations Manager (SCOM) to monitor the state of View components, including View Connection Server instances, security servers, and the View services that run on View Connection Server and security server hosts.
View Integration Example: Assigning a View Connection Server Group Name In this example, the vdmadmin command sets the name of a View Connection Server group to VCSG01. vdmadmin -C -c VCSG01 What to do next Complete the procedure described in Import the View Management Packs on the SCOM Server. View Management Packs View management packs enable you to use SCOM to monitor and manage the state of View components. Table 4‑1. View Management Packs View Management Pack Description VMware.View.Discovery.
View Integration Procedure 1 Copy the View management packs from the View Connection Server instance or security server to the SCOM server. The View management packs are in the C:\Program Files\VMware\VMware View\Server\extras\ManagementPacks directory on the View Connection Server host or security server. 2 In the Operations Manager console, go to Administration\Management Packs and select Import Management Packs. 3 Use the Import Management Packs wizard to import the View management packs.
View Integration n Complete the procedure described in Enable a Proxy Agent on a View Connection Server Host or Security Server. The discovery script can discover a Windows server only if you use the Operations Manager console to enable the proxy agent for the server. Procedure 1 In the Operations Manager console, go to Monitoring\Windows Computers. 2 Select a computer system and click the VMware View Run Discovery Probe action.
View Integration View Object Classes and Relationships The VMware.View.Library management pack contains class and relationship definitions for the View management packs. A class can have properties, such as a name or ID. The relationships between classes describe their hierarchy. For example, the relationship contains exists between VMware.View.Clusters and VMware.View.Cluster, and between VMware.View.Cluster and VMware.View.Cluster.Node. The VMware.View.
View Integration Table 4‑4. View Library Base Classes (Continued) Class Name Description VMware.View.Component.SecurityGateway Represents the Security Gateway component that has been installed on a member of a View Connection Server group. This class inherits its properties from VMware.View.Component. VMware.View.Component.SecurityServer Represents the Security Server component that has been installed on a member of a View Connection Server group. This class inherits its properties from VMware.View.
View Integration Table 4‑5. View Library Concrete Classes (Continued) Class Name Description VMware.View.Component.SecurityServer.Ite m Represents version 5.1.x or a later release of the Security Server component that has been installed on a member of a View Connection Server group. This class inherits its properties from VMware.View.Component.SecurityServer. VMware.View.Component.Web.Item Represents version 5.1.
View Integration Table 4‑6. Available Views for View Objects (Continued) View Description Connection Server Role Performance Data Secure Gateway Role Performance Data Displays the following data sets. n All Sessions n All Sessions High n SVI Sessions n SVI Sessions High Displays the following data sets. n Secure Gateway Sessions n Secure Gateway Sessions High Available Monitor Types for View Objects The VMware.View.Monitoring management pack provides the following monitor types.
View Integration Table 4‑7.
View Integration Procedure 1 In the Operations Manager console, go to Monitoring\VMware View\Performance. 2 Select the Connection Server Role Performance Data or Secure Gateway Role Performance Data view. 3 Select the required data sets. Display Alerts for a View Connection Server Group You can use the Health Explorer in the Operations Manager console to display information about alerts that the health monitors raise for a View Connection Server group. Prerequisites Integrate View with SCOM.
View Integration Procedure 1 In the Operations Manager console, go to Monitoring\VMware View and select the Group State view or the Group Node State view. 2 Right-click a View Connection Server group or member that is in the alert state and select Open > Health Explorer. 3 In the Health Explorer, select the alert and click Restart the service in the knowledge article.
Examining PCoIP Session Statistics with WMI 5 You can use Windows Management Instrumentation (WMI) to examine performance statistics for a PCoIP session by using any of the supported programming interfaces, including C#, C++, PowerShell, VBScript, VB .NET, and Windows Management Instrumentation Command-line (WMIC). You can also use the Microsoft WMI Code Creator tool to generate VBScript, C#, and VB .NET code that accesses the PCoIP performance counters.
View Integration To avoid a division-by-zero error, verify that the denominator in the expressions for calculating bandwidth or packet-loss percentage does not evaluate to zero. USB statistics are recorded for zero clients, but not for thin clients or software clients. General PCoIP Session Statistics The WMI class name for PCoIP general session statistics is Win32_PerfRawData_TeradiciPerf_PCoIPSessionGeneralStatistics. Table 5‑1.
View Integration Calculating Packet Loss for Transmitted PCoIP Data To calculate the percentage of transmitted packets that are lost, use the following formula. 100 * (TXPacketsLost[t2]-TXPacketsLost[t1]) / (PacketsSent[t2]-PacketsSent[t1]) PCoIP Audio Statistics The WMI class name for PCoIP audio statistics is Win32_PerfRawData_TeradiciPerf_PCoIPSessionAudioStatistics. Note Audio statistics do not include audio data that is carried within USB data. Table 5‑2.
View Integration PCoIP Imaging Statistics The WMI class name for PCoIP imaging statistics is Win32_PerfRawData_TeradiciPerf_PCoIPSessionImagingStatistics. Table 5‑3. PCoIP Imaging Statistics WMI Property Name Description ImagingBytesReceived Total number of bytes of imaging data that have been received since the PCoIP session started. ImagingBytesSent Total number of bytes of imaging data that have been transmitted since the PCoIP session started.
View Integration PCoIP Network Statistics The WMI class name for PCoIP network statistics is Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics. Table 5‑4. PCoIP Network Statistics WMI Property Name Description RoundTripLatencyms Round trip latency in milliseconds between the PCoIP server and the PCoIP client. RXBWkbitPersec Overall bandwidth for incoming PCoIP packets averaged over the sampling period, in seconds.
View Integration Calculating Packet Loss for Received Network Data To calculate the packet loss in percentage for received data over the time interval from time t1 to time t2, use the following formula.
View Integration Calculating Bandwidth for Received USB Data To calculate the bandwidth in kilobits per second for received USB data over the time interval from time t1 to time t2, use the following formula. (USBBytesReceived[t2]-USBBytesReceived[t1]) * 8 / (1024 * (t2-t1)) Do not use USBRXBWkbitPersec for the calculation.
Setting Desktop Policies with Start Session Scripts 6 With start session scripts, you can configure specific View desktop settings before a desktop session starts based on information received from Horizon Client and View Connection Server. For example, you can use a start session script to configure desktop policies based on client device and user location instead of setting up multiple desktop pools that have different desktop policies.
View Integration As a best practice, use the Horizon Agent CommandsToRunOnConnect and CommandsToRunOnReconnect group policy settings to run command scripts after a desktop session is connected or reconnected. Running scripts within a desktop session, rather than using start session scripts, satisfies most use cases. For more information, see “Running Commands on View Desktops” in the Configuring Remote Desktop Features in Horizon 7 document.
View Integration Enable the VMware View Script Host Service You must enable the VMware View Script Host service on each View desktop virtual machine where you want View to run a start session script. The VMware View Script Host service is disabled by default. When you configure the VMware View Script Host service, you can optionally specify the user account under which the start session script runs. Start session scripts run in the context of the VMware View Script Host service.
View Integration 4 Add the path to the start session script to the registry. a In the navigation area, right-click ScriptEvents, select New > Key, and create a key named StartSession. b In the navigation area, right-click StartSession, select New > String Value, and create a string value that identifies the start session script to run, for example, SampleScript. To run more than one start session script, create a string value entry for each script under the StartSession key.
View Integration 7 (Optional) To enable the VMware View Script Host service to time out the start session script, set a timeout value. a Navigate to HKLM\SOFTWARE\VMware, Inc.\VMware VDM\ScriptEvents\StartSession. b In the topic area, right-click the Default (@) key and select Modify. c In the Value data text box, type the timeout value and click OK. A value of 0 means that no timeout is set. 8 Exit the Registry Editor and restart the system.