Skip to content

Posts tagged ‘Tools’

24
Feb

Introducing the PCoIP Configuration Utility (beta)

Let’s get this out of the way – I’ll be the first to admit this tool needs a better name and I’m open to suggestions but for now let’s talk about what this tool does.

For quite some time internally I have been pushing for some way to dynamically adjust PCoIP tuning parameters while a session is still active. I have a host of ideas that this capability would allow for both admin and end-user, and I would be happy to build the tools to enable those ideas, if only the capability were there. But alas, currently the best we can do is tweak parameters across a session disconnect/reconnect.

“Wait a minute!”, you say, “I thought PCoIP AUTOMATICALLY adjusts session parameters already! Why do we need a tool to do this?”

Well, it does automatically adapt. But sometimes it can use a little help. There’s a reason vSphere exposes advanced parameters, or that sysctl exists on Linux – while both of those products do an excellent job of adapting to workloads in real-time, sometimes you can tune them to better fit a given workload in advance if you know what you’re doing. PCoIP is no different there. It actively measures network conditions and adapts within the envelope it’s given as defined by a handful of parameters. The “art” of tuning PCoIP is knowing how to control those parameters at a macro level and then letting PCoIP adapt itself within them at a micro level. So while the protocol does well on it’s own, we can help it out in certain circumstances when we’re already informed about the network conditions the VDI session is running on.

This need or desire to control PCoIP a bit better often shows itself in a use case where a user works on their VMware View desktop all day in their corporate office (on the LAN), and then they need to access that same desktop remotely (WAN). In this use case, it’s often desirable to reduce certain PCoIP settings when accessing the desktop via the WAN – which in turn reduces the overall “fidelity” of the desktop experience – but allow the settings to remain at their defaults (very high fidelity) when the desktop is accessed via the LAN.

And that’s the catch…

Currently VMware View only allows an either/or method of setting PCoIP parameters on a given desktop. You put the desktop in an OU, you assign the PCoIP GPO to that OU and then you tweak – if you want different settings, well, you create another pool in a different OU, assign the PCoIP GPO, and tweak (differently). Then you entitle the user to both (possibly identical) desktops, and hope that they choose the right one at the right time. Now, there are ways to mitigate this a bit, and I am making it sound as bad as it can possibly be but I’m just trying to prove a point – it’s not easy or pretty to support a use case that requires multiple PCoIP profiles for a given user on a given desktop in VMware View today.

So what can we do?

Well, we know we have to deal with a disconnect/reconnect, so let’s take that as a given. It’s not ideal (some might say it sucks – someone like me for example), but it’s what we’ve got. With that in mind, what we’re looking for here is a tool/utility that will allow us the ability to select a PCoIP profile easily and quickly from inside our desktop. Ideally it should also allow the editing and creation of new profiles so that if conditions should change – WAN could mean 3G, WiFi, W@H – a user has the ability to create an appropriate profile. Lastly, it should probably have some way to measure/show the performance of the connection as it behaves within a given profile.

It just so happens that the PCoIP Configuration Utility does just those things! Rejoice!

 

PCoIP Configuration Utility

This tool is intended to be dropped into a virtual desktop – and probably started at boot/login if it’s not already running – and it will allow the desktop user to select from a list of PCoIP profiles. The profiles are “applied” by editing the registry and setting the desired values for the PCoIP parameters. You then need to disconnect/reconnect and the new profile will take effect. The tool comes pre-loaded with a few default profiles which you can delete or edit as you see fit. Don’t read too much into the names at this point :) It also allows you to take any existing profile, customize it and then save it under any name you wish.

The utility runs as a systray application so you may need to tweak your settings to insure the icon is always visible (if you want it to be) and all major functionality is accessed via a right-click on the systray icon.

Systray Icon and active profile tooltip

Systray Icon and active profile tooltip

Menu and profile list

Menu and profile list

 

Operation

Operation of the tool is fairly straightforward but I’ll cover the menu items here in order for completeness sake:

Activate Profile

This menu option will pop out a list of all available PCoIP profiles and you can then simply click on the profile you wish to activate.

Manage Profiles

This option opens a new window allowing you edit/create/delete profiles:

The Profile Editor window

The Profile Editor window

Profile selection within the editor window

Profile selection within the editor window

The values you can adjust here relate directly to the GPO settings (though the wording varies a bit).

  • To edit an existing profile just select it from the drop-down list, adjust any parameters as needed, and then click ‘Save Profile’.
  • To create a new profile begin with an existing profile, edit it, then type in a new name within the drop-down list and click ‘Save Profile’.
  • To delete a profile, select it, and click ‘Delete Profile’
  • To remove all existing profiles and reset to the default profile list, click ‘Restore Defaults’
  • To close the Profile Editor window, click the close button in the upper right.

Clear Profile Settings

Clicking this menu option will remove all currently applied profile settings, and clear out the value of the “last used” profile that the app will try to re-apply when it is launched. In effect this just reverts to the View defaults OR if followed up by a gpupdate /force will allow for easy reversion to the GPO defaults (if any are applied – it may not be wise to apply a GPO if you are using the utility, more on that later).

Show Session Stats

This menu option will popup a small monitor that will poll the PCoIP WMI sessions stats to provide some general information about the current session:

Session Stats Monitor window

Session Stats Monitor window

The window will be “always on top”, can be dragged by clicking it, and is slightly transparent to be less intrusive. Selecting the menu option a second time will hide the monitor window.

A few notes on the stats displayed in the window:

  • PCoIP CPU utilization is not showing accurately in the status monitor – it’s higher than it should be when comparing against taskmgr measuring the same process. I am looking into this – it is beta code people :)
  • The status monitor only shows “Tx” stats for items where it is relevant. The two values shown are current Tx/Peak Tx, for other items the values are the same – current/peak. In most cases Tx is what you really care about anyway and I didn’t want the window to be any larger than it needed to be.

 Exit

I am assuming we can all figure out what this menu item does.

 

Requirements, Issues, Implementation details, etc.

  • I developed and tested the app on Win7 64bit but it should work on 32bit systems including XP – if it doesn’t, I need you to tell me.
  • .NET 3.5 is required
  • You should really only use this with VMware View 5.0 or the 5.1 beta
  • Tuning profiles and last used profile are stored in HKCU and in theory should be able to roam with a user to whatever desktop they happen to land on – if you have something setup to allow the profile to roam, that is.
  • The utility will request admin access – it needs this to be able to write to HKLM which is where the PCoIP settings are read from. You may need to get clever while launching it if you want to avoid UAC nagging you about it.
  • This really is beta-class software. I threw this together in 2-3 days right before I left for PEX. There will be bugs. Find them, get me the steps to reproduce them, and I will fix them. Understand that YMMV, and that you assume all risk for any damage this utility may cause to your VDI environment! Back things up before messing with it please!

GPO Conflicts

So, how does a tool that writes directly to the local registry compete with GPO settings? In this case quite well for the most part. GPO will always “win” eventually, so whatever settings you apply, if they are different from a GPO that is also applied to your desktop, will get overwritten at the next policy refresh. BUT! since the PCoIP server process only reads parameters at session connection, so long as you activate a profile, and disconnect/reconnect BEFORE a policy refresh happens the server will load it’s config from the profile and happily go about it’s business. If a policy refresh comes down and changes the registry settings it won’t matter one bit to the PCoIP server – unless you disconnect (or get dropped). If that happens you need to re-activate the profile you want and disconnect/reconnect again (it sucks, I know). But generally, that should be an infrequent event unless your policy is set to sync quite frequently.

Still, the best advice is to avoid applying a PCoIP GPO to the desktops where you plan to use the utility.

I imagine there are a few ways I can detect if the settings have been changed by a policy refresh and then immediately re-apply the currently active profile but that’s low on the list right now. Thoughts are welcome on this though.

 

Download

You can grab a copy of the utility here: PCoIPConfig.exe

 

In Closing

I am releasing this tool because I hope that some people may find it useful, but also to solicit feedback. In a way I am hoping to foster an angry mob to help me push for truly dynamic configuration of the PCoIP server process. I have described this as wanting people to say “This tool is awesome! But it sucks!” – in reference to it’s perceived usefulness, and the disconnect/reconnect requirement accordingly.

Knowing there are people (customers, partners) who see value in a tool like this will carry much farther than my one, lonely voice. So please, if you find the tool useful, but hate having to disconnect – be vocal.  Not just here, but elsewhere too – get on the VMware communities, talk to your VMware reps – show them the tool, explain the issues it attempts to solve, and how it’s close, but not quite ideal.

If truly dynamic configuration of the PCoIP server can be added it opens the door to automatically switching profiles based upon location awareness, new tuning toolsets where you can see the impacts of tuning settings in real-time, new tools for an automated PCoIP health-check, and many other things! I already have the ideas, but until we can avoid the disconnect they’re just not viable. Until then, let’s see where this goes…

23
Feb

PCoIP Log Viewer and View 5.1 Beta

With the public release (for nominated customers) of VMware View 5.1 you may encounter PCoIP log files that seem to parse correctly but fail to render properly when loaded into the Viewer.  This is likely a result of a log file format change within the beta causing invalid data to appear somewhere in the XML output.

This is, unfortunately, a common occurrence with any updated release of View. The log file format changes with annoying regularity and I will need to update the parser to deal with the new format. Until I can address that – possibly April due to my travel schedule – you should just rely on the WMI stats for monitoring 5.1 beta sessions. Waiting a few weeks for log file visualization shouldn’t cause too much harm to anyone (I hope!) but I did want to give a heads-up in case anyone had encountered this issue.

19
Dec

Public Release of PCoIP Log Viewer 2.0

I am very pleased to announce the release of my PCoIP Log Viewer tool to the public.

Before we dive into any details I do want to point out a few key things-

Despite me calling this “Version 2.0” it is, in many ways, a 0.8 release, if you will.  This is because the original Log Viewer was only ever released as an internal VMware tool (Full Disclosure: I work for VMware) and all it dealt with was the parsing and visualization of the PCoIP server log files –  hence the clever and catchy “Log Viewer” name.  To myself and the rest of VMware, that was version 1.0. Several iterations were released internally but none significant enough to warrant a major revision change.  With the introduction of the WMI counters in View 5.0 I knew I wanted to include a real-time element to the viewer and at that point the 2.0 stream began. The release you see here today is the first release of the tool that provides log file visualization as well as real-time monitoring of the PCoIP WMI counters but the real-time portion of the app is really in it’s early stages of development so expect bugs and a bit of “unpolished” behavior.

Another point I want to make is that this tool comes as-is. It is a project I work on mostly in my spare time, and while recently it has become a larger part of my actual workstream at VMware, it’s still just me supporting it.  It’s not endorsed or supported by VMware Inc. in any way. Any problems you may have with it need to be brought to me and should not reflect in any way on my employer.

Lastly, there are many of you and just one of me. I may be unresponsive at times. I may not fix YOUR bug immediately. This doesn’t mean I don’t care it just means I am likely busy with other tasks. Rest assured, I take this tool very seriously and I strive to produce a high-quality and useful (most importantly) piece of software but there ARE bugs, and more will be uncovered. I will address them as quickly as my schedule allows – but cut me some slack :)

Ok, with that out of the way let’s talk about what exactly this thing does-

PCoIP Log Viewer 2.0

The PCoIP Log Viewer provides capabilities to visualize and analyze PCoIP performance metrics collected from PCoIP server log files and real-time WMI counters.

Features

  • Parsing and graphical display of PCoIP performance metrics from PCoIP server log files (View 4.x, 5.0)
  • Agentless, real-time display of PCoIP WMI counters (View 5.0)
  • Ability to store WMI sessions for later review
  • WMI-Rewind™  for DVR-like capability to move forward and back through time while viewing (or reviewing) a WMI session
  • Tabbed interface to display multiple concurrent WMI sessions and/or log files
  • Drag-and-Drop display of multiple (parsed) log files for easy/rapid opening when troubleshooting
  • Export of saved WMI sessions to XLSX format for custom analysis and graphing

Requirements

Parser

  • Windows (XP, Vista, 7)

Viewer GUI

  • Windows (XP, Vista, 7), MacOS, Linux
  • Java 1.6+

Access

The Viewer is comprised of two components, a front-end parser for converting PCoIP server log files into XML, and a Viewer GUI for graphing the resulting files and performing real-time monitoring of PCoIP WMI statistics.  If all you plan to utilize are the real-time WMI capabilities you do not need to download the front-end parser, just grab the Viewer GUI and be on your way. The parser is split out so that it can easily be included into a master VDI image and then scripted to parse log files at logoff or on-demand by help desk resources. The resulting files can then be placed onto a network share (for example) where support personell can drag them into the Viewer GUI.

You can download the Log Viewer components here:

Please make sure that you have Java 1.6 or greater installed (see Requirements) before accessing the Webstart link!

Installation and Operation

Video guides and tutorials will be forthcoming and will cover operation of the tool in far greater detail than I am about to reveal here. If you are uncomfortable “flying blind” with a new tool and no instruction manual, then I suggest you wait until those items are produced and published. I also suggest that you might want to consider a career choice outside of IT :-)  For the rest of you, here is a very brief guide to getting started:

  • Download the parser (remember where you put it), open a cmd shell, navigate to the directory where you placed the pcoip_parse executable and run: pcoip_parse.exe -h
  • Read the resulting output
  • Download the Webstart/JNLP file for the Viewer GUI and let the installation procede. You will see that I have self-signed the JAR files, and you may be prompted to trust me. Normally I would recommend against this, but in this case, it’s probably something you want to do. I promise to be trustworthy with regards to this tool.  In all seriousness, the Log Viewer does need read/write access to local disk in order to store the database and any exported files there, hence the request for full access.
  • If you plan to use real-time WMI stat collection you must take the following steps on the desktop VM(s) you want to monitor:
    • Disable Windows Firewall, or allow DCOM to pass. I recommend disabling as I was never able to get DCOM to pass cleanly otherwise and most implementations have a real firewall sitting in front of the desktops anyway.
    • Ensure the Remote Registry Service is started and set it to Automatic
    • Set Ownership to Administrators, and then enable Full Control for Administrators on the following registry key:
HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11d1-8B02-00600806D9B6}
  • Now go forth and experiment
  • Wait for some tutorial videos to come

Known Issues and Limitations

  • For a WMI connection to be established and monitor a desktop there must be a PCoIP session active on that desktop. Essientally the PCoIP server process must be running to generate PCoIP WMI stats.  If the server isn’t running, there’s nothing to collect, and the tool doesn’t really do anything but die a horrible, firey death – sometimes.
  • The Log Viewer must be used on a local LAN to get accurate results. While technically you can connect via VPN and poll a desktop for stats it will be seriously delayed and you may never achieve a polling interval of less than 5 seconds – regardless of what you set the interval to be. This is partially a result of making the Viewer agentless and using DCOM to poll for stats, and partially because the pure Java implementation of DCOM I am using to insure the tool will run cross-platform can be very chatty.  I am hoping to improve this going forward but the current recommendation if you require remote monitoring is to spin up a small pool of desktops within the View infrastructure you need to manage and install the Log Viewer onto them, then remotely access those desktops as a jump-point to monitor the rest of the infrastructure.
  • When viewing a WMI session the “Client Address” field under “Session Statistics” will actually show the virtual desktop IP/host name rather than the actual IP of the attached client. This is more of a placeholder for a future feature add than an actual bug.
  • The Log Viewer window can be scaled/sized vertically to show more graphs at a time, but scaling it horizontally will not scale the graphs to be “wider”.  If you need to see more detail in a given area click and drag from left-to-right to zoom instead of trying to make the graph itself larger. This may be addressed in a future update.
  • While little testing has been done to confirm/invalidate it, I do not suggest using the Log Viewer for extended periods of time. I would consider extended logging to be 8 hours or more. While things might be just fine, I do not have enough data to mark this as a valid use case.
  • When shutting down, the Log Viewer will do a database compaction. Depending on the current size of the database and how much data has been added since the Viewer was last shutdown this can be a time-consuming process. That’s all well and good, except there’s no indication from the UI that this database compaction is taking place so it appears as though the Viewer is hung, which may lead you to want to kill it, which would be a bad thing while in the middle of a compaction process.  Just be patient, and see the previous limitation to avoid monitoring REALLY long sessions.
  • Mac/Linux users may see some minor GUI rendering issues with placement and/or clipping of text/icons on certain screens.

In Closing

I realize there is very little material here to help you understand what the tool is telling you but the plan is to produce a series of videos to handle that going forward. Until then feel free to submit questions in the comments and I will likely setup an FAQ page to answer them. I’ll update this post once that is in place.

I hope you find the tool useful and find value in what it tells you.