Examples of Using PowerShell cmdlets to Examine PCoIP Statistics 42
VMware, Inc.
Setting Desktop Policies with Start Session Scripts43
5
Obtaining Input Data for a Start Session Script 43
Best Practices for Using Start Session Scripts 43
Preparing a View Desktop to Use a Start Session Script 44
Sample Start Session Scripts 47
3
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.
The information in this document is written for experienced Windows or Linux system administrators who
are familiar with virtual machine technology and datacenter operations.
VMware, Inc.
4
Introduction to View Integration1
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.
This section includes the following topics:
n
View Components
n
Integration Interfaces to View
View Components
You can use View with VMware vCenter Server to create desktops from virtual machines that are running
on VMware ESX® or VMware ESXi™ hosts and deploy these desktops to end users. You can also install
View on RDS hosts to deploy desktops and applications to end users. View uses your existing Active
Directory infrastructure for user authentication and management.
After you create a desktop or application, authorized end users can use Web-based or locally installed
client software to securely connect to centralized virtual machines, back-end physical systems, or RDS
hosts.
View consists of the following major components.
View Connection
Server
Horizon AgentA software service that is installed on all guest virtual machines, physical
Horizon ClientA software application that communicates with View Connection Server to
VMware, Inc. 5
A software service that acts as a broker for client connections by
authenticating and then directing incoming user requests to the appropriate
virtual machine, physical system, or RDS host.
systems, or RDS hosts to allow them to be managed by View.
Horizon Agent provides features such as connection monitoring, virtual
printing, USB support, and single sign-on.
enable users to connect to their desktops.
View Integration
View AdministratorA 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 ServerA server that acts as a central administrator for ESX/ESXi hosts that are
connected on a network. A vCenter Server instance provides the central
point for configuring, provisioning, and managing virtual machines in the
datacenter.
View ComposerA software service that is installed on a vCenter Server instance to enable
View to rapidly deploy multiple linked-clone desktops from a single
centralized base image.
Integration Interfaces to View
You can use several interfaces to integrate View with external applications.
Event databaseYou can configure View to record events to a Microsoft SQL Server or
Oracle database. You can then use business intelligence reporting engines
to access and analyze this database.
Lightweight Directory
Access Protocol
(LDAP)
Windows Management
Instrumentation (WMI)
You can export and import LDAP configuration data from and into View.
You can create scripts that update this configuration data without accessing
View Administrator directly.
You can examine performance statistics for a PCoIP session.
VMware, Inc. 6
Integrating View with the Event
Database2
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. An example of statistical
sampling is recording the maximum number of users over a 24-hour period.
You can use business intelligence reporting engines such as Crystal Reports, IBM Cognos, MicroStrategy
9, and Oracle Enterprise Performance Management System to access and analyze the event database.
This section includes the following topics:
n
Event Database Tables and Schemas
n
Connection Broker Events
n
Horizon Agent Events
n
View Administrator Events
n
Event Message Attributes
n
Sample Database Queries and Views
Event Database Tables and Schemas
View uses database tables to implement the event database. The event database prepends the names of
these tables with a prefix that you define when you set up the database.
Event Database Tables
The following table shows the database tables that implement the event database in View.
Table 2‑1. Event Database Tables
Table NameDescription
eventMetadata and search optimization data for recent events.
event_dataData values for recent events.
VMware, Inc. 7
View Integration
Table 2‑1. Event Database Tables (Continued)
Table NameDescription
event_data_historicalData values for all events.
event_historicalMetadata 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. You can use
View Administrator to configure the time period for which the database keeps a record in the event and
event_data tables.
Important View does not restrict the growth of the event_historical and event_data_historical tables.
You must implement a space management policy for these tables.
A unique primary key, EventID, identifies each event that View records in the event and event_historical
tables. View records data values for each event in the event_data and event_data_historical tables. You
can obtain the complete set of information for an event by joining the event and event_data tables or the
event_ historical and event_data_historical tables on the EventID column.
The EventType, Severity, and Time columns in the event and event_historical tables identify the type and
severity of an event and the time at which it occurred.
For information about setting up the event database, see the View Installation document.
Note Events might be lost if you restart View Connection Server instances while the event database is
not running. For a solution that avoids this problem see http://kb.vmware.com/kb/1021461.
Event Database Schemas
The following table shows the schema for the event and event_historical database tables.
Table 2‑2. Schema for the event and event_historical Tables
Column NameOracle Data TypeSQL Server Data TypeDescription
AcknowledgedSMALLINTtinyintWhether View acknowledged the event.
n
0 = false
n
1 = true
DesktopIdNVARCHAR2(512)nvarchar(512)Desktop ID of the associated pool.
EventIDINTEGERintUnique primary key for the event.
EventTypeNVARCHAR2(512)nvarchar(512)Event name that corresponds to an item in
the message catalog. For example,
BROKER_USERLOGGEDIN.
FolderPathNVARCHAR2(512)nvarchar(512)Full path of the folder that contains the
associated object.
GroupIdNVARCHAR2(512)nvarchar(512)SID of the associated group in Active
Directory.
VMware, Inc. 8
View Integration
Table 2‑2. Schema for the event and event_historical Tables (Continued)
Column NameOracle Data TypeSQL Server Data TypeDescription
LUNIdNVARCHAR2(512)nvarchar(512)ID of the LUN that stores the associated
object.
MachineIdNVARCHAR2(512)nvarchar(512)ID of the associated physical or virtual
machine.
ModuleNVARCHAR2(512)nvarchar(512)View component that raised the event. For
example, Admin, Broker, Tunnel,
Framework, Client, or Agent.
ModuleAndEventTextNVARCHAR2(512)nvarchar(512)Event message with values substituted for
attribute parameters.
NodeNVARCHAR2(512)nvarchar(512)Name of the virtual device node.
SeverityNVARCHAR2(512)nvarchar(512)Severity level. For example, INFO,
WARNING, ERROR, AUDIT_SUCCESS,
AUDIT_FAIL.
SourceNVARCHAR2(512)nvarchar(512)Identifier for the source of the event.
ThinAppIdNVARCHAR2(512)nvarchar(512)ID of the associated ThinApp™ object.
TimeTIMESTAMPdatetimeTime at which the event occurred,
measured from the epoch (January 1,
1970).
UserDiskPathIdNVARCHAR2(512)nvarchar(512)ID of the user disk.
UserSIDNVARCHAR2(512)nvarchar(512)SID of the associated user in Active
Directory.
The following table shows the schema for the event_data and event_data_historical database tables.
Table 2‑3. Schema for the event_data and event_data_historical Tables
Column NameOracle Data TypeSQL Server Data TypeDescription
BooleanValueSMALLINTtinyintValue of a Boolean attribute.
n
0 = false
n
1 = true
EventIDINTEGERintUnique primary key for the event.
IntValueINTEGERintValue of an integer attribute.
NameNVARCHAR2(512)nvarchar(512)Attribute name (for example,
UserDisplayName).
StrValueNVARCHAR2(512)nvarchar(512)Value of a string attribute. For other types
of attributes, this column contains an
interpretation of the data type as a string.
VMware, Inc. 9
View Integration
Table 2‑3. Schema for the event_data and event_data_historical Tables (Continued)
Column NameOracle Data TypeSQL Server Data TypeDescription
TimeValueTIMESTAMPdatetimeValue of a date and time attribute.
TypeSMALLINTtinyintThe data type of the attribute.
n
0 = StrValue
n
1 = IntValue
n
2 = TimeValue
n
3 = BooleanValue
Connection Broker Events
Connection broker events report View Connection Server-related information, such as desktop and
application sessions, user authentication failures, and provisioning errors.
The BROKER_DAILY_MAX_DESKTOP_SESSIONS event reports the maximum number of concurrent
desktop sessions over a 24-hour period. If a user runs multiple desktop sessions concurrently, each
desktop session is counted separately.
The BROKER_DAILY_MAX_APP_USERS event reports the maximum number of concurrent application
users over a 24-hour period. If a user runs multiple applications concurrently, the user is counted only
once. Short-lived sessions might not be included in the count because the sampling is performed every
five minutes.
The BROKER_VC_DISABLED and BROKER_VC_ENABLED events report the state of the vCenter
driver that View uses to track a vCenter Server instance.
The BROKER_VC_STATUS_* events report the state of a vCenter Server instance.
The following table lists all the event types for View Connection Server.
Table 2‑4. Connection Broker Events
Event TypeSeverityModuleAndEventText
BROKER_AGENT_OFFLINEWARNINGThe agent running on machine ${MachineName} has
not responded to queries, marking it as offline
BROKER_AGENT_ONLINEWARNINGThe agent running on machine ${MachineName} is
responding again, but did not send a startup message
BROKER_APPLICATION_LAUNCH_FAILUREERRORUnable to launch from Pool ${PoolId} for user $
{UserDisplayName}: The broker encountered an error
while processing the request, please contact support
for assistance
BROKER_APPLICATION_MISSINGWARNINGAt least ${ApplicationMissingCount} applications,
including ${ApplicationExecutable}, are not installed on
${MachineName} in Pool ${PoolId}
BROKER_APPLICATION_NOT_ENTITLEDAUDIT_FAILUnable to launch from Pool ${PoolId} for user $
{UserDisplayName}: User is not entitled to this Pool
VMware, Inc. 10
View Integration
Table 2‑4. Connection Broker Events (Continued)
Event TypeSeverityModuleAndEventText
BROKER_APPLICATION_PROTOCOL_NOT_S
UPPORTED
AUDIT_FAILUnable to launch from Pool ${PoolId} for user $
{UserDisplayName}: Requested protocol ${ProtocolId}
is not supported