#VDI Tip 60: PCoIP Wireless Monitors for Healthcare

Do you want a wireless PCoIP Monitor with a super long battery life and in a small form factor?

Cisco-Linksys WET11 Wireless Ethernet Bridge,a Samsung NC420, ergotron cart, plus a small APC UPS on the bottom of the cart forms a happy solution for medical staff. Also the lack of sound make it great for operating rooms and patient areas. Any wireless bridge will do, I have even used apple airports before. The only requirement is the Samsung NC240 because of the two network ports that come with the unit. The whole solution will run under 100 watts.


Automatically Turn Off and On Build to Lossess Based on Internal or External Access – VMware View 5.0

I’ll start off by saying the vast majority of users will never be able to tell the difference with Build to Lossess(BTL) turned off or on. VMware recommends in its PCOIP Performance Best Practices to have it turned off by default. BTL turned off is one of three major bandwidth saving in View 5.0. The other bandwidth saving features are the client side caching and the lossess codec for text.

I can see the need for it with special uses cases like in the Medical Field or high end graphical workstations in the office, but when you go home at night you just want to check an couple of emails. So lets begin.

All the PCOIP sessions variables can be controlled by Group Policy Administrative (ADM) Template files. The View ADM template files are installed in the install_directory\VMware\VMware View\Server\extras\GroupPolicyFiles . To get this to work we need to use:

    vdm_agent.adm – used to run a viscual basic script or PowerShell script on Connect or Reconnect
    pcoip.adm – used to set the defaults for Frame Rate, BTL, Image quality and many more.

The PCOIP will take the settings you provide and apply them at the time you connect to your virtual desktop. If you want to verify the settings are being used you can check the logs on the VM at :\ProgramData\VMware\VDM\logs ( I am pretending everyone is running Windows 7). The first few lines of code in the pcoip_server*timestampOfConnection*.log. will show the settings, see below.

02/02/2012, 22:04:16.737> LVL:0 RC: 0 MGMT_ENV :cTERA_MGMT_CFG::load_server_config_from_stores[1]: Did not process over-rideable pcoip defaults from registry.

02/02/2012, 22:04:16.737> LVL:0 RC: 0 MGMT_ENV :cTERA_MGMT_CFG::Registry setting parameter pcoip.audio_bandwidth_limit = 150

02/02/2012, 22:04:16.737> LVL:0 RC: 0 MGMT_ENV :cTERA_MGMT_CFG::Registry setting parameter pcoip.image_cache_size_mb = 300

02/02/2012, 22:04:16.737> LVL:0 RC: 0 MGMT_ENV :cTERA_MGMT_CFG::Registry setting parameter pcoip.enable_build_to_lossless = 0

You can only detect where the user has connected from after the fact, you will have to make your users disconnect to make the necessary changes. So I guess it’s not that automatic but it’s the best I good come up with.

How do you tell where the user connected from?

You can find out from the following registry key –
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_URL
If they are connecting from outside your corporate network it should be the name of your security server which you can check for. If your using an F5 device and no security servers you will have to use
HKEY_CURRENT_USER\Volatile Environment\ViewClient_IP_Address
and create your own logic. PowerShell might be the easiest to use because it has a LIKE operator which will make a quicker job of comparing strings.

So here is the code that you use to accomplish the task of turning BTL off. I named the text file Flip-BTL.vbs

'Declare Environment Variables

Dim ViewBroker, BTL

'Set Environment Variables

Set WSHShell = CreateObject("WScript.Shell")

'Lookup values in registry and assign to variables

ViewBroker = WSHShell.RegRead("HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_URL")


'Check Build to Lossess and if they are connecting to a security server

If ((ViewBroker = "External-Broker-Name") And (BTL = 1)) Then


'Test Message Box inform the user

MsgBox "Your Connected from a Remote Location, to get better performance please disconnect and connect to get optimal user experince. A new setting must be applied"

End If

'Check to see if they connected from home and turned BTL off but are now back on the LAN
If ((ViewBroker = "Internal") And (BTL = 0)) Then


'Test Message Box inform the user

MsgBox "Your Performance is optimized for a slow link. To have the best user experience disconnect your session and log back in. A new setting must be applied"

End If

To get the code to run when the user connects into their session we must use the vdm_agent.adm. The graphic below shows a local policy but you should use an AD one for better manamgment.