Showing posts with label XenApp. Show all posts
Showing posts with label XenApp. Show all posts

Sunday, February 8, 2015

Citrix Summit 2015: Day 2

Day 2 (really day 3) started with the tech talks keynote. This key note is NDA, so I cannot go into detail. But, suffice to say there will be a good number of announcements most likely during Synergy later this year. But one thing I am excited to look into, is Workspace Cloud.

I attended self-paced labs for a good chunk of the day, which gives great hands-on experience to many Citrix technologies.  But starting in the afternoon, I attended a session about vGPU and XenServer presented by David Cottingham. It is nice to see XenServer getting some love. I am really happy about the 64bit architecture, as this will allow for further compatibility with hardware manufacturers (Fusion-io). This session went into detail about the 6.5 release of XenServer. Below are some of the new features / information about this release:
  • 64-Bit control domain. The control domain (dom0) used to be 32bit, not anymore!
  • In memory read cache. This feature allows you to store your golden images in RAM, significantly improving performance.
  • Storage. Live LUN expansion! Support for tapdisk3.
  • Network. Updated Open vSwitch 2.1.3. Improved vNIC performance.
  • vGPU. Now 96 GRID vGPU sessions per host.
  • XenServer split into two editions: Standard and Enterprise.
The last session of the day, I attended was another great presentation by Daniel Feller. Extremely fast paced because so much great information crammed into a small segment of time. Daniel went into various tests the Citrix team performed on various hypervisors with the resulting performance outcomes. The three hypervisors tested were Microsoft, VMWare, and of course Citrix. One of the best stats was that of the RAM Cache with Disk Overflow. In a nut shell, you can get down from an average of 15 IOPS per Windows 7 user to .1 IOPS. All this while not using expensive an SAN, or using local expensive SSDs or some other complex configuration or expensive 3rd party hardware addition. All you need is RAM plus some disk.


The day closes out with the partner closing keynote. Another great day! But, there is more to be had...PARTY!!! Well the partner appreciation party. This time we got bused to the Las Vegas Speedway. Plenty of great food and entertainment. You could strap in and take a ride around the oval with a professional driver, take a drifting ride, or get in the driver seat yourself with go-karts. I was able to get in the drifting car and that was a insane! Well played Citrix.

With the close of Summit, there are a few things to take away:
  • Citrix is definitely focused on consumer (a.k.a the user) experience.
  • With Framehawk integration, it is a no brainer when choosing between Citrix and VMWare.
  • Linux is not a limiting factor anymore when looking into desktop virtualization.
  • A mouse for iPad!
  • Easier migrations from Legacy Citrix products.
If you are on legacy Citrix products, thinking about VDI, or wanting to load balance / accelerate network traffic, contact a Citrix partner and ask for a demo. This year is a great year to get started.

Wednesday, January 21, 2015

Citrix Summit 2015: Day 1

As day 1 (really day 2) started and I realized it takes me 30 minutes to get from my hotel to Summit and working off bad in room coffee, I ponder my hotel choice for the event. Oh well, a quick grab of actual coffee (not hotel room coffee).... and on to the Vision Keynote! So this if the official kick off of Summit, even though it really started yesterday. Great attendance, great vibe, and a great staff as we walk into the main room. The lights dim and the information starts flowing. 

OK, there was some great presentations, but you want to see a summary, not read me ramble on about software defined stuff or whatever. But, I do have to say that Citrix has the "consumer" experience first, and this is of course not a new idea. But, this has been forgotten by many. Not that the consumer comes first, but the experience of the consumer must come first. 

One other idea that Mark Templeton introduced was the software defined workspace. What makes up the software defined workspace idea is agility, manageability, and predicting what users want before they know. 

Below is a quick list of the announcements during this keynote:
  • XenServer 6.5 - What I have been excited about during the beta testing of XenServer 6.5 is a 64bit dom0!
  • XenApp online migration tool - There are some powershell scripts to help migrate from XenApp 6.5 to 7.6, but this migration tool will make it that much easier.
  • Citrix Receiver X1 - A nice new clean interface, that can be branded, and other features like application ratings and bundles (sounds like folders). You can see the new receiver here.
  • Citrix XenMobile 10 - For more information, click here.
  • Session recording (a.k.a. Smart Auditor) - Its funny how Citrix had some great features back in the day, then depreciated them, now bringing them back. I do give Citrix great credit in listening to customers and partners, and bringing them back. Again, they are focusing on the experience and this is very apparent.
  • WorkspacePod - A complete Citrix certified integrated solution from the hardware to deliver workspaces.
  • CloudBridge Virtual WAN - More information to come.
  • Linux virtual desktops and apps - I am very excited about this. Now, I don't get very many requests for Linux virtual desktops, but I am a huge Linux fan and this makes me very happy!
  • Framehawk integration - Where do I start? Framehawk helps with packet loss (yes I am over simplifying this). But to what extent? There was a demo with up to 10% loss over a WIFI connection with the user experience seeming to be unaffected except for the computer without using Framehawk. Nice, OK. Then they bumped up the packet loss to 50%! The computer not using Framehawk was unusable, but the computer using Framehawk was working just fine. Very, very, very impressed!
  • Citrix X1 Mouse - Finally a mouse for iPad users!

After the keynote, off I went to partake of the many offerings of Citrix Summit 2015. First on the agenda was an instructor led lab about using the NetScaler 10.5 NITRO API. Now, I'm not really a developer, even though I have and currently working on some custom solutions. This was the first time I was introduced to this method and using REST interfaces. It was very interesting learning how to manipulate NetScaler outside the CLI and GUI. For more information, click here.

I finished out the day working on some more labs, like WAN optimization using CloudBridge. For more information, click here.

Next I will be posting a summary of the final day of Citrix Summit 2015 minus the NDA stuff.

Monday, January 12, 2015

Citrix Summit 2015: Day 0

One flight delayed, and the airline pilot announcing "what happens in Vegas will live with you forever".... Not really the exciting journey I was hoping for. But, once in Las Vegas, dropped our luggage off at the hotel (My wife got a special sticker on her baggage. I really think she packed some kettle bells in some hidden compartment, that suitcase was HEAVY!).  Once I found my way to The Venetian (A quick hop on the monorail, and a not so quick walk.), I made my way to the check-in to grab my badge and NEW BACKPACK!



Because of the late arrival, I wasn't able to get two self paced labs. No matter, as I am here to learn, not to regret as this is Vegas! I enter the self-paced lab area, a large room, with about half-full of like minded engineers and find my assigned seat. After perusing the catalog of courses, I settled on "Upgrading Legacy XenApp To The New XenApp 7.6".

What was nice about this lab, was it was centered on end user experience and of course... acceptance which is sometimes very hard. They stepped through a simple upgrade process:

  • Verify XenApp legacy functionality
  • Configuring StoreFront for both XenApp versions
  • Enabling application de-duplication in StoreFront
  • Enabling a Web Interface type feel in StoreFront by disabling user subscriptions
  • Exporting legacy farm data, then importing this data into XenApp 7.6
  • Upgrading XenApp 6.5 servers with the new XenApp 7.6 virtual desktop agent (VDA)
  • And of course verify
  • Plus a bonus exercise
The whole takeaway is that the user experience is a focus during an upgrade and as well, ease of upgrade. For those that are still on XenApp 6.5 (or heaven forbid XenApp 5, of which I still see around) no need to fear an upgrade, only benefits to gain. Definitely looking forward to tomorrow morning!

Wednesday, December 31, 2014

How to Force Sessions through NetScaler Gateway

It always happens. You start a project with a clear direction and wham, you get a curve ball. Something new pops up out of no where and you have to quickly scramble to address this well timed [sarcasm] addition and try to stay on schedule. Better yet, have the schedule already very aggressive based on a customers deadline of which you cannot go past or the gates of hell, otherwise known as the project managers fury come raining down and... OK, I'm being a bit over dramatic, but you get the idea.

The above scenario happened to me (minus the project managers fury) not too long ago during a project that had an unusually  aggressive time line. I had to deploy a full XenApp environment to several hundred users spread across 3 (maybe more) continents. This in itself is not complicated or hard, it was the time line that provided the stress as there was little wiggle room for surprises.

Sure enough, as with most projects, there are surprises. This surprise was a bit more than what I wanted. I discovered, that the VLAN housing the XenApp environment, created by the client, was not accessible by any other location and was not able to be so because of an internal configuration they had. Not only this, they wanted to direct all sessions through NetScaler Gateway on the public side, but keep all the benefits of pass-through authentication, and pretty much everything else that makes sure an shortcut is presented on the users desktop with the published application and all they have to do is launch the shortcut.

My requirements were:

  • Have all sessions directed through NetScaler Gateway on the public Internet.
  • Keep pass-through authentication in place.
  • Have users access a VLAN that they cannot access.
  • Be able to view network metadata in Director per session.
My first thought was how in the world was I going to keep pass-through authentication? I knew that not too long ago NetScaler Gateway does have the ability for pass-through authentication using kerberos. But, because of the time line, we did not have time to deal with that solution. Next, I came across StoreFront optimal gateway feature which fit exactly with what I was trying to accomplish as well as all my requirements could still be kept and it was simple to implement. The work flow for this setup is as follows:


  1. Citrix Receiver launches and contacts StoreFront for single-sign-on.
  2. StoreFront retrieves the published resource list from a Citrix Delivery Controller and forwards this to the endpoint.
  3. Citrix Receiver now sees the published resources available.
  4. The user clicks on the published resource and the application is launched over NetScaler Gateway.
  5. All session traffic runs through NetScaler Gateway.
The StoreFront optimal gateway feature allows the Citrix Reciever to connect to StoreFront and then when the user launches a session, StoreFront directs the session through NetScaler Gateway of your choosing. Pass-through authentication works as you are authenticating against StoreFront and STA's are used when sessions are started through NetScaler Gateway. To combat the problem of users unable to access the XenApp VLAN, all I had to do was move the load balanced virtual server on NetScaler to a VLAN which all users had access. Problem solved, and quickly.

To configure StoreFront optimal gateway:

  1. Get the following information:
    1. The name of the farm as found in the StoreFront "Manage Delivery Controllers" section. Remember that XenApp used to have farms and not sites? Don't confuse this with the site name.
    2. Name of the NetScaler Gateway appliance as found in StoreFront "NetScaler Gateway" settings. I am talking about the logical name, not the URL, so whatever the name column has.
    3. The NetScaler Gateway URL for users to use. To direct users to the public IP, I had the internal DNS A record for the NetScaler Gateway site point to the public IP.
    4. And of course, the STA URLs. I would hope at least two.
  2. You need to modify the web.config file which is by default in C:\inetpub\wwwroot\Citrix\[store]\web.config. Keep in mind it is the store name, not the storeweb directory. Make a backup of the web.config file. Did I mention to make a backup of the web.config file? 
  3. Open the web.config file with a text editor (notepad or whatever) and search for optimalGatewayForFarmsCollection. This is the section you want to modify.
  4. Modify the text below with the information collected found in bold:


Save the file and perform the same steps on any other StoreFront servers you use and you should be set.

This post was written in reference to the following platforms and versions:

  • StoreFront 2.6
  • XenDesktop 7.6
  • NetScaler 10.5 Build 53.9

Sources:

Citrix Systems, Inc.. (Jul 21, 2014). How to Force Connections through NetScaler Gateway Using  Optimal Gateways Feature of StoreFront [Article]. Retreived from http://support.citrix.com/article/CTX200129

Monday, December 10, 2012

"Could not log on" or "Unexpected Response" Error While Using Citrix Receiver through Access Gateway

Scenario

You have a Citrix XenApp 6.5 farm setup behind Access Gateway with Web Interface installed on the NetScaler.  Users access the Web Interface from their workstations through Access Gateway just fine.  But, for mobile access, users receive either a "could not log on" or "unexpected response" error on their mobile device and they are not able to log on.

Troubleshooting Steps


  1. Verify authentication is being handled properly, look at the logs on the NetScaler and for Access Gateway.
  2. Verify your session policies for Citrix Reciever are setup properly with the correct policy rules and order.
  3. Check to see that "Clientless Access" is set to allow, in either the global defaults for Access Gateway, or in the session policy itself for mobile devices.

Saturday, March 10, 2012

ThinKiosk - Active Directory Design Reference


I had originally did a quick write up on ThinKiosk by Andrew Morgan here when it first came out.  I have been using ThinKiosk personnally since then and have come up with a ThinKiosk Active Directory design reference.  Please note, these guides are in now way affiliated with ThinKiosk or Andrew Morgan, they are just the method I came up with that seems to work best for me.  You can read more about ThinKiosk from Andrew Morgan at his site:

http://andrewmorgan.ie/

First: Identify Endpoint Devices

Before we can get started, we need to identify the endpoint devices where ThinKiosk will be deployed.  Once you have the devices, you need to create an Active Directory (AD) organizational unit (OU) to hold those endpoint devices.  For demonstration purposes, I named the OU "ThinKiosk".  Once you have created the OU, then you need to move all your AD computer objects which you identified earlier into this OU.  Before moving on to the next phase you need to have the following in place:

  • Identified all endpoint devices that will be using ThinKiosk.
  • The identified endpoint devices must be part of the AD domain.
  • An OU structure created:
    • A root endpoint device OU (For example, I named this OU "ThinKiosk").
  • Place all endpoint AD computer objects in their respective OU created before.
Second: Identify User Roles

We now need to identify what users will receive what functionality.  There are 3 major categories for users in regards to ThinKiosk:
  1. Endpoint Users
  2. Help desk users
  3. Administrators
With endpoint users, there should be minimal user functionality, in other words, they need to be locked down.  Help desk users need a bit more flexability because they might need access to tools that would be normally locked out to endpoint users.  Administrators need full access and typically would need to log straight into the Explorer shell instead of ThinKiosk.  Based on the descriptions below is a sampling of features per user group:

Endpoint users features:
  • Log off the auto logged in session
  • Restart the local endpoint device
  • Shutdown the local endpoint device
  • Change display settings
  • Change keyboard settings
  • Change mouse settings
  • Change volume settings
Help desk users features:
  • Have the same ability of task workers
  • Enter custom Citrix Web Interface URLs
  • Access the command prompt
  • Access Windows Explorer
  • Lock ThinKiosk
  • Exit ThinKiosk
Administrators features:
  • Have the same ability of help desk users
  • Log in straight to the Windows Explorer shell
For each of the above groups of users, we need to create an AD security group.  Before moving to the next phase, the following needs to be completed:
  • Users identified in their proper feature group
  • Create 3 AD security group, 1 for each feature group (For example, the following AD security groups named: ThinKiosk-Users, ThinKiosk-HelpDesk, ThinKiosk-Administrators)
  • Add users to their respective groups based on features
Third: Create Group Policy Objects

Group policy is going to deploy the settings and permissions for the respective user groups.  The following group policy objects (GPO) need to be created:
  1. ThinKiosk GPO.  This GPO is applied to all endpoint devices no matter what OS version.  So any computer settings that are global and non OS dependent will be applied at this GPO.
  2. Endpoint users GPO.  This GPO is linked to the same endpoint device root OU.  This GPO applies settings and permissions to endpoint users only.
  3. Help desk users GPO.  This GPO is linked to the same endpoint device root OU.  This GPO applies settings and permissions to help desk users only.
  4. Administrators GPO.  This GPO is linked to the same endpoint device root OU.  This GPO applies settings and permissions to administrator users only.
The following is a list of base GPO settings per GPO:

ThinKiosk GPO:
  1. To automatically install ThinKiosk:
    1. Navigate to: Computer Configuration\Policies\Software Settings\Software Installation
      1. Create a new package and select the ThinKiosk.msi file from an accessible network location
  2. Set the URL to the Citrix Web Interface:
    1. Navigate to: Computer Configuration\Policies\Administrative Templates\Classic Administrative Templates (ADM)\ThinKiosk Settings
      1. Web Interface URL - Enabled and enter the URL for the Citrix Web Interface.
  3. OPTIONAL.  To configure auto login for the ThinKiosk endpoint devices.  Please note, the password entered is stored in clear text in the GPO and on the endpoint device.  So, if you want to use this option, make sure the account used is extremely locked down.  To use a group policy auto login account, you need to download the ADM file provided by Andrew Morgan which can be downloaded here.  An alternative approach is to configure each endpoint manually with the "Control UserPasswords2" command and configure appropriately.
    1. Import the ADM file into the GPO.
    2. Navigate to: Computer Configuration\Policies\Administrative Templates\Classic Administrative Templates (ADM)\ThinKiosk Settings\Autologon Settings
      1. AutoLogon to Workstation - Enabled and set to Yes.
      2. Default DomainName - Enabled and type in the FQDN of the AD domain.
      3. Default Password - Enabled and type in the password for the locked down AD account used for autologin.
      4. Default User Name - Enabled and type in the username for the locked down AD account used for autlogin.
Endpoint users GPO:
  1. Allow user policy settings to apply only when logging into a ThinKiosk endpoint device:
    1. Navigate to: Computer Configuration\Policies\Administrative Templates\System\Group Policy
      1. User Group Policy loopback processing mode - Enabled and set to Merge
  2. Change the shell from Windows Explorer to ThinKiosk:
    1. Navigate to: User Configuration\Policies\Administrative Templates\System
      1. Custom User Interface - Enabled and type C:\Program Files\ThinKiosk\ThinKiosk.exe
  3. Lockdown control-alt-delete options:
    1. Navigate to: User Configuration\Policies\ Administrative Templates\System\Ctrl-Alt-Del Options
      1. Remove Change Password - Enabled
      2. Remove Lock Computer - Enabled
      3. Remove Task Manager - Enabled
  4. Configure ThinKiosk settings:
    1. Navigate to: User Configuration\Policies\ Administrative Templates\Classic Administrative Templates (ADM)\ThinKiosk Settings
      1. Disable unlocking of ThinKiosk - Enabled
      2. Show Log Off Option - Enabled
  5. Disable screen saver password protection:
    1. Navigate to: User Configuration\Policies\ Administrative Templates\Control Panel\Personalization
      1. Password protect the screen saver - Disabled
Helpdesk users GPO:
  1. Allow user policy settings to apply only when logging into a ThinKiosk endpoint device:
    1. Navigate to: Computer Configuration\Policies\Administrative Templates\System\Group Policy
      1. User Group Policy loopback processing mode - Enabled and set to Merge
  2. Change the shell from Windows Explorer to ThinKiosk:
    1. Navigate to: User Configuration\Policies\Administrative Templates\System
      1. Custom User Interface - Enabled and type C:\Program Files\ThinKiosk\ThinKiosk.exe
  3. Configure ThinKiosk settings:
    1. Navigate to: User Configuration\Policies\ Administrative Templates\Classic Administrative Templates (ADM)\ThinKiosk Settings
      1. Show Admin Menu - Enabled
      2. Show Log Off Option - Enabled
Administrators GPO:
  1. Allow user policy settings to apply only when logging into a ThinKiosk endpoint device:
    1. Navigate to: Computer Configuration\Policies\Administrative Templates\System\Group Policy
      1. User Group Policy loopback processing mode - Enabled and set to Merge
  2. Change the shell from Explorer (This policy is in place to make sure users can be moved form one group to another and make sure they receive the correct shell):
    1. Navigate to: User Configuration\Policies\Administrative Templates\System
      1. Custom User Interface - Enabled and type C:\Windows\Explorer.exe
  3. Configure ThinKiosk settings:
    1. Navigate to: User Configuration\Policies\ Administrative Templates\Classic Administrative Templates (ADM)\ThinKiosk Settings
      1. Show Admin Menu - Enabled
      2. Show Log Off Option - Enabled
Conclusion

In conclusion, this is just a base reference.  There are obviously more settings and permissions that can be configured.  If anybody has suggestions, or a better idea, please leave your comments below.

Thursday, March 1, 2012

Manually Create a PNAgent Shortcut to a Published Application


In some cases I need to have Active Directory Group Policy Preferences to handle pnagent shortcuts.  To create a shortcut you need to adhere to the following command line format:


[local path to pnagent.exe file] /Qlaunch "[farm name defined on the services site]:[published application name]"

Please note, the farm name is not the same farm name as defined in XenApp.  The farm name is what is defined in the Web Interface Services Site.  Also, the farm name and published application name is case sensitive.

For example:

"C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /QLaunch "XenApp:Notepad"

You can also use the above format in deploying shortcuts via Active Directory Group Policy. To do this:


  1. Open the group policy management console.
  2. Open an existing group policy or create a new one.
  3. Navigate to: User Configuration | Preferences | Windows Settings | Shortcuts
  4. Create a new shortcut with the following parameters (parameters not listed below means it is up to you to decide what you want):
    1. Target type: File System Object
    2. Target path: C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe
    3. Arguments: /QLaunch "[farm name defined on the services site]:[published application name]
    4. Icon file path: [make sure the location of the icon file is accessible by all clients]
  5. You can then set item level targeting to target only those that are assigned the published resource.

(Updated) Page Hangs at agesso.jsp After Logging in Through Access Gateway on NetScaler 9.3


This is an update to my original post.  I've decided to update this post to include some more troubleshooting tips to help resolve this issue.  I have seen this error a few times and as of now each time was a different problem.  The previous article was posted here.

Step 1: Verify STA / XML servers are responding

  1. Verify the STA URL.  The URL should be in the following format: http[s]://[FQDN of STA server]/scripts/ctxsta.dll
  2. Confirm you can reach the XML service:
    1. Start your favorite telnet client
    2. Open a session to the FQDN of your STA server on the port which your XML service is running
    3. You should receive some sort of response, which verifies the XML service is responding
  3. If steps 1 and 2 are failing, or you are still having issues, check the event log on the STA servers for any issues and check to make sure all your services that are set to automatic are started.
At one customer site, I found an issue with the XML service not responding on one of the servers.  I also found other issues on that server, the SID was not randomized causing authentication issues.  So I performed a Sysprep on that server to randomize the SID and re-add it to the domain.  After the server was back online the XML service was responding correctly.  For more detailed information on how to sysprep a server please see the section Solution 1: How to generalize a computer SID.

Step 2: Check the Web Interface log on the NetScaler

  1. Start your favorite SSH client
  2. Open a session to the NetScaler
  3. Type shell
  4. Type cd /var/wi/tomcat/logs
  5. There will be a bunch of files named localhost.[date].log.  Find the log file with the most recent date and open it.
  6. Scroll down to the bottom of the file to see the most recent entries and look for any errors or issues.
I found an issue here in one instance with the following error message:

..."Event Log ID: 18001 A communication error occurred while attempting to contact the Access Gateway authentication service at https://[fqdn of Access Gateway]/CitrixAuthService/AuthService.asmx.  Check that the authentication service is running.  The message reported by the underlying platform was: ; nested exception is: You have not chosen to trust "GTE Cybertrust Global Root", the issuer of the server's security certificate"...

With the above error, the problem was that the Web Interface call back to Access Gateway isn't working because the Java the certificate wasn't being imported to the java trusted store.  This was verified when I went to the Web Interface in question on the NetScaler with the Access Gateway attached and the option "Trust SSL Certificates" was selected but when you next through the options you get to the end and you get the following error:

"Import SSL certificate failed.  Following command execution failed: ./export_cert.sh"...

So at this point I needed to manually add the certificate as a trusted certificate in the java store.  Please see the section Solution 2: How to manually add a trusted certificate in the java store.

Solution 1: How to generalize a computer SID

The steps below will not delete any data on the computer. But, make sure your data is backed up before proceeding.
  1. Remove the computer from the domain.
  2. Navigate to: c:\Windows\System32\sysprep\sysprep.exe.
  3. The System Preparation Tool will open.
  4. Under System Cleanup Action, select Enter System Out-of-Box Experience (OOBE).
  5. Make sure the Generalize checkbox is selected.
  6. Under Shutdown Options, select Reboot.
  7. The server will then reboot and the SID will be generalized.
  8. Go through the normal system setup steps.
  9. Add the server back to the domain.
Solution 2: How to manually add a trusted certificate in the java store

  1. Open your favorite SSH client and open a session to your NetScaler.
  2. Access the shell by typing: shell and press enter.
  3. Backup your existing java store:
    1. Type: mv /var/wi/java_home/lib/security/cacerts /var/wi/java_home/lib/security/cacerts.bak
    2. Modify the export_sh.sh file:
      1. You can use WinSCP or if you are familiar with a Linux text editor to modify /netscaler/wi/export_cert.sh.
      2. Find line STOREPASS=
      3. Type in a 6 digit keystore password after STOREPASS= (e.g. STOREPASS=abc123)
      4. Save the file.
      5. Copy the file:
        1. cp /netscaler/wi/export_cert.sh /var/wi/
    3. Modify the rc.netscaler file to make these changes persistent across reboots:
      1. You can use WinSCP or if you are familiar with a Linux text editor to modify /netscaler/rc.netscaler.
      2. Enter the following line: cp /var/wi/export_cert.sh /netscaler/wi/export_cert.sh.
    4. Add the certificate to your store:
      1. Please note, the certificate you need is in the X.509 format, not PEM.  So you will need to grab a copy of your certificate in the X.509 format but you do not need to export the private key.
      2. Copy the X.509 certificate to your NetScaler in the following directory: /var/wi/java_home/bin
      3. In the SSH shell session, type: cd /var/wi/java_home/bin.
      4. Type the following command to import the X.509 certificate: ./keytool -import -trustcacerts -file [certificate file name] -alias [certificate file name] -keystore /var/wi/java_home/lib/security/cacerts.
      5. You will be prompted to enter the keystore password which you defined earlier in the export_cert.sh file.
      6. When prompted Trust this certificate? [no] type yes.

This post was written in reference to the following platforms and versions:

  • Citrix Web Interface 5.4
  • Citrix NetScaler 9.x
  • Citrix XenApp 6.5
  • Microsoft Windows 2008 R2

Sources:

Citrix Systems, Inc.. (March 26, 2014). How to Manually Configure Certificate Trust in Web Interface for NetScaler [Article]. Retreived from http://support.citrix.com/article/CTX127615


Monday, February 20, 2012

XenApp and High Availability (HA) / Disaster Recovery (DR)


Designing high availability (HA) and / or disaster recovery (DR) can be a daunting task.  There are many options and many components in which to consider.  Just a sampling of some of the questions you will have to consider:
  • How the failover will function?
  • What is the process for failover?
  • Why would you want a manual or automatic process?
  • What systems do you want to protect?
  • How will users gain access to their data?
This article does not try to cover all of the complexities of a DR design but it does address the recommended guidelines when considering XenApp in use with NetScaler to provide a highly available design.

Server Capacity Sizing

When designing a XenApp environment, many customers say they want it designed for X number of users.  But, what they need to keep in mind as well as the consultant is to make sure they have extra room to handle a server outage.  For instance, if one of the XenApp servers were to fail, those users will need to be distributed among the rest of the XenApp servers.  The design should be a N + 1 design as recommended by Citrix.  This design allows for a failure of 1 server and the rest of the servers will still be able to handle the user load without any performance degradation.

SQL

In most larger companies, SQL servers are protected through either clustering, mirroring, or replication.  But a lot of smaller companies forgo this option as it might seem too complex, or not necessary.  No matter what the company size is, protecting your databases is important.  But, this is easily solved, and not as complex as what some may think.  There are even 3rd party software vendors that try to make this as easy as possible, like Double-Take.  Also starting with SQL 2005, these methods are built into the product.  So in other words, there is no excuse, protect your SQL server.

Hypervisor

I'm not going to go into all the benefits of server virtualization, but in regards to XenApp, there are a few benefits I want to point out.  These benefits have a direct correlation with your HA / DR design.

First, HA.  With HA, you can configure your VM's to restart on another host, if the original housing host fails suddenly.  This will keep your XenApp farm with your desired number of servers up.  Yes, users will lose their connection if they were on the VM that lived on the host that failed.  But, with your N+1 design, they try to login right away and of course get redirected to a different live server.  This gives, the failed VM enough time to restart on a good host and ready to handle user traffic again without your intervention.  VMWare and XenServer do this very well.

Second, [Xen/V]motion.  If a hypervisor host is failing, meaning it hasn't failed yet, but its demise is imminent you can move your live running servers to another hypervisor host with no disruption to your users (yes, they may experience a brief "pause", but their sessions remain active and no data is lost).  Most all of hypervisors have this functionality, VMWare calls it VMotion and XenServer calls it XenMotion.  Whatever you call it, it works, and it works well.

Third, DR.  Most major hypervisor players offer some sort of DR feature in their product as well.  This allows the virtual machines (VMs) to be brought up at another separate physical location in the event of a catastrophic failure.  This would be considered a standby method.  This means, that the DR site is not active and needs to be brought online before any resources can be utilized.  I wouldn't say this is good for all servers, as some would benefit more from a service level DR, like with SQL mirroring and such.  I like using this on servers that have data that doesn't change much, so the likely hood of data loss is mitigated.  A hybrid approach is best used when considering this feature.  XenApp servers are a good fit for this as there is no data on them.

Access Gateway

Access Gateway (AG) allows for secure access to published resources and internal systems through either an ICA proxy or SSL VPN.  If you were to only have 1 AG, and it went down, then all external users would then be unable to access the internal systems.  Therefore, it is best to deploy them in a pair so you can load balance across them, and you can achieve load balancing across your AGs via NetScaler.  Even easier, you could run AG as a feature inside your NetScaler.

Web Interface / Cloud Gateway

No, I'm not discussing the difference between Web Interface (EOL 2015) and Cloud Gateway (Web Interfaces successor).  But, you need either or to allow users to gain access to their published resources.  You need to think of how many are needed to handle the user load, especially during peak times in the morning when users are getting in and starting their sessions.  But, no matter what, always have at least 2 (if you are having bad performance because you failed to properly size the number of front end servers needed, don't blame me).  Great you have 2, but how do you balance them?  Microsoft NLB?  No!  You use NetScaler to load balance the servers.  NetScaler is smart enough (as long as you configure it) to determine if a server down and traffic needs to be redirected to another server, or to just redistribute traffic.

Broker Service

What does the broker service do?  The broker service is what your Web Interface (WI) / Cloud Gateway (CG) uses to authenticate users when they login, enumerate published resources for a user, and direct users to an available XenApp server.  So, if that server were to go down, users wouldn't be able to do anything, not even login to the WI / CG.  Again, you want to properly size your environment for your user load, but also again, you don't want to have just 1 broker service.  Also, just like WI / CG, you use the abilities of NetScaler to load balance your brokers for performance and making sure they are online before sending requests.

Data

If you have a multiple site implementation of XenApp, then you have to contend with user data between them.  First, which I am hoping you have done already, is implemented some form of profile offloading from the XenApp servers.  This can be done through Citrix Profile Management, or through a 3rd party vendor like AppSense, or RES.  Then you have to make sure the data that the users are accessing is close to the XenApp farm.  In the case of multi-site XenApp implementations, you will need to do a couple things:

  1. Replicate user data between sites.  You can accomplish this through SAN replication, Microsoft DFSR, or some other 3rd party solution.
  2. Make sure you set the preferred XenApp site for your users so that they are closest to their data.

Global Server Load Balancing

Global Server Load Balancing (GSLB) is not part of XenApp, but it is part of NetScaler and it pairs very well with this discussion.  GLSB allows a single namespace to be load balanced or failover between physical sites.  So, if you had to failover to your DR site, you can do this at the URL level with GLSB and continue on down the line of bringing your services online.

In Conclusion

The combination of NetScaler, XenServer, and XenApp provide solid basis for a XenApp HA / DR solution.  This article went over at a high level of the components to think about when designing a XenApp HA / DR solution.  There are many other products that compliment this solution, but that is for another time.




Thursday, February 9, 2012

Host to Client Redirection for Internet Explorer Doesn't Work

I received a request to setup host to client redirection for Internet Explorer for an existing XenApp 6.5 farm.  So, I created a XenApp policy and set host to client redirection to enabled and set the filter appropriately.  But, when I went to go test it, on one server it worked fine, but another server it did not work at all.  Below is how I troubleshooted the issue and ultimately found the answer to my situation.  Hopefully this saves someone some hours.

Step 1:  Verify XenApp policies

In Citrix AppCenter:

  1. Navigate to Citrix Resources\XenApp\[farm name]\Policies
  2. Click on the "Users" tab
  3. Create or modify a policy
  4. Make sure "Host to client redirection" (found in ICA\File Redirection) is enabled
  5. Make sure your filters are set appropriately

Step 2:  Verify that XenApp policies are being applied

In Citrix AppCenter:

  1. Navigate to Citrix Resources\XenApp\[farm name]\Policies
  2. In the "Actions" pane click on "Run the modeling wizard"
  3. Go through the wizard, selecting a test user and the problematic XenApp server to make sure the policy is being applied
In the registry for the test user:

  1. Navigate to HKLM\Software\Wow6432Node\Policies\Citrix\[session id of test user]\User\UXPolicies
  2. Verify that AllowServerFTA is set to 1
Step 3:  Verify the HTTP registry key is set correctly

In the registry:

  1. Navigate to HKCR\http\shell\open\command and HKCR\https\shell\open\command and verify the default value data is set to:
    1. "C:\Program Files (x86)\Citrix\system32\iexplore.exe" "%1"
Step 4:  Verify there are no user specific conflicting registry settings

In the registry:

  1. Navigate to HKCU\software\microsoft\windows\shell\Associations\UrlAssociations
  2. If the key exists, this is most likely the issue
  3. Backup the registry key and delete it
  4. Log off your user session and then log back in and try clicking on an Internet link
Step 4 was the answer to my issue.  At some point, and not sure when, a software installation or some customization created the key which caused IE to not launch as specified in step 3.  Since this is a per user setting, I used Active Directory group policy preferences to delete that key for each user when they login.

Please note, you follow the above steps at your own risk.  

Saturday, February 4, 2012

ThinKiosk - Turn Your Old Hardware into a Windows Thin Device for Free!

During all my VDI roll-outs, at the end of building the infrastructure and training the customer with client deployment techniques, there is always the question on how to make create the best endpoint experience for the user.  There are several different ways of course, depending on what functionality the end user needs.  But, in regards to your basic task worker, where all they need is a connection to their virtual desktop, and they want to utilize their current endpoint devices, I usually would recommend a home brew solution that I created. My solution involved setting up Internet Explorer in kiosk mode and setting that to the user interface instead of explorer.exe and a list of registry/group policy modifications that limits what the end user can do on their endpoint and give them access to their virtual desktop.  My solution was OK at best for customers who wanted a free solution and did not want to go the Linux route as this had several disadvantages as well.

Now, some very smart person named Andrew Morgan created an application that is meant to replace the default shell explorer.exe  This new shell brings the user straight to the Citrix Web Interface for login to access their virtual desktop.  The reasons why I am very impressed with this shell:

  • Session and power state control
    • Restart
    • Shutdown
    • Log off 
  • User session options
    • Display settings
    • Keyboard settings
    • Mouse settings
    • Volume settings
  • Administrator options
This gives users the basic control necessary for a positive end user experience, without giving them unneeded access.  A nice feature what feature is displayed to the user either by Group Policy or registry editing.  Below is how I setup ThinKiosk:

  1. Created a new VM to gain a better vantage of a typical customer aging endpoint device:
    1. Windows XP x86
    2. 512MB RAM
    3. 10GB hard drive
  2. After I logged into the VM for the first time, I installed the following:
    1. Internet Explorer 8
    2. Adobe Flash Player
    3. Citrix Receiver
    4. ThinKiosk
  3. Create a user and set that user to auto login:
    1. In a command prompt type "Control userpasswords2"
    2. Complete the autologin configuration
  4. I then modified the shell for the auto login user account to point to ThinKiosk.exe:
    1. Navigate to HKCU\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon
    2. Created a new string named "Shell"
    3. Set the data value to "C:\Program Files\ThinKiosk\ThinKiosk.exe"
    4. You can also set this through Group Policy -  http://technet.microsoft.com/en-us/library/cc975911.aspx
  5. Created the following registry keys (you can create these through Group Policy preferences):
    1. Create the following key: HKCU\Software\ThinKiosk
    2. Create the following values:
      1. Name = "URL"
        1. Type = REG_SZ
        2. Value = the URL to your Citrix Web Interface
      2. Name = "SHOWADMINMENU"
        1. Type = REG_DWORD
        2. Value = 1 or 0
      3. Name = "SHOWLOGOFF"
        1. Type = REG_DWORD
        2. Value = 1 or 0
      4. Name = "WINDOWMODE"
        1. Type = REG_DWORD
        2. Value = 1 or 0
      5. Name = "WINDOWMODEPERCENT"
        1. Type = REG_SZ
        2. Value = 1 or 0
    3. The above settings can also be made through group policy, in which there is an ADM file that you can download from the ThinKiosk site
  6. Configure the following group policy settings:
    1. Local Computer Policy\User Configuration\Administrative Templates\System\Ctrl+Alt+Del Options
      1. Remove change password - Enabled
      2. Remote lock computer - Enabled
      3. Remote task manager - Enabled

Wednesday, January 4, 2012

How to Publish a Remote Executable in XenApp 6.5

As with any Citrix XenApp farm, you will need to publish applications. Most applications are either installed or copied to the XenApp servers, and all you need to do is point to the executable when publishing that application (granted there maybe numerous other settings that may need to be done for the application to work properly). But, every now and then there are those pesky applications that reside on an “application” server that is just an executable and that executable for some reason has to live on that “application” server.
So, to bring happiness to your users you publish this executable that resides on another server. The program launches just fine when you are connected to the XenApp server with a full desktop, but when you launch the program as a published application, it fails. The problem is with a Citrix XenApp feature named Application Installation Check.

The Application Installation Check verifies the executable is present before returning it to the user. That is fine, but it this feature uses the Local System account to check for this executable. There is the problem, since the Local System account doesn’t have access to this executable since it resides on the network, the application fails to launch. You have 2 options for this issue:

Option #1 - Create a batch file that launches the remote executable
Option #1 solves the problem by keeping the launched executable local (the batch file). The batch file then launches the remote executable. To do this, create a batch file in a location you choose (I usually use C:\Program Files (x86)\[Application Name]\[Application Name].cmd) with the .cmd file extension. Open the file with notepad or some other text editor of your choice and add the following lines:

NET USE [Drive Letter]: \\[UNC path to executable directory]
Start [Drive Letter]:\[Executable name]

Option #2 - Disable Application Installation Check
Option #2 solves this issue by disabling the Application Installation Check, so you can publish the application in XenApp referencing the UNC path without having to worry about pesky drive mappings (Better yet, enable Microsoft’s DFSN to create a name space, so if the application is ever moved to a different server, the UNC path will remain the same and everyone is happy but that is a different topic all together). To disable Application Installation Check in XenApp 6.5 perform the following:


  1. Download and install the Citrix XenApp 6.5 PowerShell SDK on the XenApp servers (this gives you the ability to perform many functions via PowerShell).
  2. Launch PowerShell shortcut just installed in your Start menu under the Citrix program folder (actually the shortcut is a few sub-folders beneath the Citrix program folder) as an Administrator.
  3. Enter the following command (substitute [brackets] with the information asked within the brackets, don’t type the brackets themselves):
    1. Set-XAApplication –BrowserName [Published application name] –LoadBalancingApplicationCheckEnabled $FALSE
  4. To verify the command was successful, type the following:
    1. Get-XAApplication -BrowserName [Published application name]
  5. You should see the variable LoadBalancingApplicationCheckEnabled set to false.
Why I prefer option #2, is for 2 reasons:
  • You don't have to worry about mapped drives
  • You don't have to worry about creating and managing batch files