Horizon Logon Monitor Service deep(ish) dive

There are many factors that impact logon times to virtual desktops (or to desktops in general). Troubleshooting is usually time consuming and frustrating. Fortunately Horizon 7 comes with a built-in logging service that allows administrators to quickly acknowledge, identify and find the root cause of a problem. The service sends the summary data to the Horizon Console (HTML5) and reports this to the administrator in the session helpdesk view:

It’s not so easy to get this view, though. There are several requirements and steps to get this working:

  1. Horizon version 7.11 and Horizon Client 5.3 (previous versions have some issues) are required
  2. You need to enable Timing Profiler on each Connection Server as per documentation
  3. Configure an Event Database
  4. You need to change “VMware Horizon View Logon Service” service startup type to Automatic on your desktop image (by default it’s manual, that’s not in the documentation)

Once completed the requirements you can see the Logon Segments in the Horizon Console (but give it a couple of minutes after successful login to populate). The data that is used to build this chart is also available on the virtual desktop in the C:\ProgramData\VMware\VMware Logon Monitor\Logs\vmlm__desktopname_username_date.txt log file. This file can be also redirected to an SMB share. Consult the documentation.

If you need some detailed troubleshooting, the log file gives you all the data. Below is a summary of all the segments measured by Horizon Logon Service:

****************** Session Summary (User: VDEMO\wsadmin, Session: 1) *****************
[LogonMonitor::LogSummary] Logon Time: 14.56 seconds
[LogonMonitor::LogSummary] Logon Start To Hive Loaded Time: 2.44 seconds
[LogonMonitor::LogSummary] Logon Start To Classes Hive Loaded Time: 2.47 seconds
[LogonMonitor::LogSummary] Profile Sync Time: 0.00 seconds
[LogonMonitor::LogSummary] Windows Folder Redirection Apply Time: 0.00 seconds
[LogonMonitor::LogSummary] Shell Load Time: 4.53 seconds
[LogonMonitor::LogSummary] Total Logon Script Time: 0.00 seconds
[LogonMonitor::LogSummary] User Policy Apply Time: 0 seconds
[LogonMonitor::LogSummary] Machine Policy Apply Time: 0 seconds
[LogonMonitor::LogSummary] Group Policy Software Install Time: 0.03 seconds
[LogonMonitor::LogSummary] Free Disk Space Available To User: 16 GB
[LogonMonitor::LogSummary] **************************************************************************************

In addition to the logon time, there are additional informations inside the log. Here is an example of the ones I find most useful in troubleshooting:

Session is local,  SessionGuid: d13f43df-a1e0-4ffe-b9d6-85a2ca3cda5b, Session: 1
Domain Controller Discovery Time: 0.31 seconds, Error Code: 0
Network Bandwidth On One Connection: 25086386 kbps
Hive Loaded: File: C:\Users\wsadmin\ntuser.dat, Key S-1-5-21-367742975-3435947426-3231154371-1115. Session: 1
Classes Hive Loaded: File: C:\Users\wsadmin\AppData\Local\Microsoft\Windows\\UsrClass.dat, Key S-1-5-21-367742975-3435947426-3231154371-1115_Classes. Session: 1
Local Profile Path: C:\Users\wsadmin. Session: 1
Key Path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-367742975-3435947426-3231154371-1115. Session: 1
Romaing Profile Path: C:\users\mandatory.V6. Session: 1
Profile Size: 169.45MB, Files: 1507, Folders: 1144. Session: 1
File Size Distribution For Session 1:
   0 to < 1MB: 1476
   1MB to < 10MB: 30
   10MB to < 100MB: 1
   100MB to < 1GB: 0
   1GB to < 10GB: 0
   >= 10GB: 0
Disk Space Metrics For User Profile Volume:
Disk Space Available To User: 16 GB
Free Disk Space: 16 GB
Total Disk Space: 31 GB
Session Start To Logon Time: 476.97 seconds, Session: 1
Windows Folder Redirection Apply Time: 0.00 seconds. Session: 1
GPO List Changed: True, Session: 1
Computer: Run these programs at user logon: Not Configured
User: Run these programs at user logon: Not Configured
Group Policy Logon Scripts Are Asynchronous
Always wait for the network at computer start and logon: Enabled
Machine: Run these programs at user logon: Not Configured
User: Run these programs at user logon: Not Configured
Wait for remote user profile: Not Configured
Set maximum wait time for network if a user has a roaming profile or remote home directory: Not Configured
Specify network directories to sync at logon, logoff time only: Not Configured

In closing, it’s worth mentioning that App Volumes and Dynamic Environment Manager can also be part of the “slow login” equation. If you’re interested in this topic and you do have access to VMworld On-Demand Content Library then I highly recommend watching the ADV1076BU session “Troubleshooting YourHorizon 7 Deployment” by Joshua Spencer and Graeme Gordon, VMware, Inc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s