Archives for February 2012

Feb
04

Going to Virtualization Field Day 2 – Silicon Valley

I am very excited and honoured to be a delegate for the next Tech Field Day. Virtualization Field Day 2 is running from February 22 – 24, 2012 in Silicon Valley. I’ve always thought that the Tech Field days have been great whether you were a delegate or watching the streaming content. While all my expenses are paid for getting to the event and during the event, I am under no obligation to blog about anything I see. Will I blog about the presenting sponsors? Most likely because I like technology and sharing what I know. I am sure the content will be great as past events.

Two of the presenters have already be mentioned on Twitter at @TechFieldDay . One of those presenters I have a fair bit of experience with their product. I hope that presnter will give us a road map on their up and coming releases. The other presenter I really don’t know much about at all, so it be interesting to see what they have to offer.

Once the official Presenter list is posted make sure you book some time off to watch it live via the live stream. You’re always welcome to ask questions or if you get tied up at work you can download the content later. The content is usally available about a week or two after the event. If you have something you want me to ask prior to going,let me know. I’ll do my best to get ask the question(s) on your behalf.

A specific vendor you want to see?, Nominate one here.
Want to become a delegate?, learn more here.

Feb
02

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")

BTL = WSHShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Teradici\PCoIP
\pcoip_admin_defaults\pcoip.enable_build_to_lossless")

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

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

WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Teradici\PCoIP\
pcoip_admin_defaults\pcoip.enable_build_to_lossless","0","REG_DWORD"

'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

WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Teradici\PCoIP\
pcoip_admin_defaults\pcoip.enable_build_to_lossless","1","REG_DWORD"

'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.