Wednesday, December 3, 2014

Configure HP Quality Center for Streamed XenDesktop 7.6

HP Quality Center is web based tool used by tester and developer (Don’t ask me more detail beyond this : ) )


While working with HP QC we must know it requires:

  • Requirements for QC to work is to have MS office 32 bit for now in base image, early next year TCOE/HP will update UFT after that we will be able to   use MS office 64 bit.
  •   HP QC will work only in IE 32 bit version
  • HP Quality Center download 280 MB of plugin and store under c:\users\APPDATA\LOCAL\HP

Now with above requirement if we are planning to deploy desktop class OS then you have multiple choice to choose from Flexcast model


Challenge : We have tried using UPM to synch around c:\users\APPDATA\LOCAL\HP but couldn’t  succeeded. So we tried PVD (Personal vDisk ) route but PVD does require minimum space and spending space just for 280MB file is waste of valuable storage space.

Solution: How about using Streamed static non persistent desktop. Once users logged in, desktop will be assigned to the users at the same time image can be streamed. We need to find out the way to redirect  APPDATA\LOCAL\HP . Remember this is not straight forward and that’s why we are discussing here.

User profile SID  sits in HKLM\Software\Microsoft\WindowsNT\Currentversion\ProfileList which is non-persistent since the C:\ drive is streamed in  read-only mode.

So first redirect : HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders


HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders


When running Quality Center  for the first time it loads ALM-Platform-Loader.msi, a copy and associated files are copied to AppData\Local\Microsoft\Windows\Temprorary Internet Files\Content.IE5 folder.  Because of the read-only nature of the images and the UPM is not synchronizing AppData\Local contents when a VM is rebooted and re-logged. It also creates a folder under AppData\Local\Temp called TD_80; this folder disappear when a user reboots the VM.

To fix this we have to do two more redirection 

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders



Tem and Temp here to be redirected:


All the registry changes can be pushed via GPO along with UPM .

Credit : Thanks for sharing this inputs my friend, you know whom I mean Smile

Tuesday, December 2, 2014

Load balancing users across datacenter using XenDesktop 7.6

We get requirement quite often to load balance users across datacenter and provide DR with XenDesktop. There are tons of article which will help you to design so. But what we are discussing here is load balancing users within delivery group.

Requirement : Load balance users delivery group across datacenter. If there are 100 users in a particular use case then 50 users should be directed to datacenter A and 50 users should be redirected to datacenter B.

Challenge: It would have been easy if we had to just load balance users. We could have used GSLB and distribute users in round robin fashion. But when it comes to delivery group this has its own challenge. To achieve this we do require single farm architecture. To build single farm architecture we do require SQL availability across the location. Challenge is with the amount of require bandwidth and latency within India. In general latency across two cities in India is around 60ms.

Gotchas: Profiles availability across datacenter. Microsoft does not support profile replication. So if we need profiles with the users then we must use two separate store at each datacenter.

How to achieve this: To start with I will put some drawing to make it simple.

SutherLand Design Document - ForBlog

Component configuration:

Two Delivery Controller at both datacenter: Total of four  Delivery Controller will be part of the single XenApp/XenDesktop Site. But here is the catch, VMS at respective DC will be pointing to respective Delivery Controller . So VMS will be register with only with respective site delivery controller.

Two StoreFront at both the datacenter: Two storefront will be in cluster at each of the datacenter. NetScaler will be used to load balance each of the storefront farm across datacenter.

Separate PVS farm at each of the datacenter: Each of the farm will be streaming VM’s in their respective datacenter.

Now coming to the important part is SQL setup. There are many ways we can setup SQL for database replication and I am not going to explain those. You can refer to article like this to get that configure. What I will explain you is how we did the setup in our environment. Two  SQL has been setup with Multi Subnet fail over cluster and something similar explained here


In our case we have one node at each of the site. WFC has been setup with the following roles

Under the server name there are two IP’s and this is used for Availability Group Listeners under SQL


WFC resource property is important to understand for failover .


This is how listener group looks like


We are replicating three database a)Site b)Logging c)Monitoring using AlwaysOn High Availability. During site creation we pointed it to listener database and allow Studio to create database. Once database were setup, It was then moved to Always ON group.


Then we separated all the database and moved separately. Now time for testing? No before we start testing we have to follow few more steps to ensure Delivery Controller is MultiSubnet aware and logins are replicated. To do so I followed Citrix blog and download the script listed here. Now its time for powershell magic. Open powershell from desktop studio and check if you have all the scripts. We need to run Change_XD_TO_MultiSubnetFailover.ps1


Once script executed then it will be upload


Post this when we run get-brokerDBConnection it will showing multisubnetfailover=true.image

Now make sure logins for all the DDC is created on replica database .


DDC is ready for fail over testing. Now we need to create delivery group for  datacenter A and map catalog corresponding catalog. Separate delivery group for datacenter B  mapped to catalog for respective dc.

Now we need to publish desktop  to this both deliver group.

Add-BrokerApplication -Name "Publised App Name" -DesktopGroup "Delivery Group A"

Add-BrokerApplication -Name "Publised App Name" -DesktopGroup "Delivery Group B"

So what will be the end result: Users will hit GSLB which will deploy users in round robin fashion across datacenter. Users will  land on one the LB Store Front server and will get access to application. Users will be load balanced in round robin fashion but will land on same delivery group. Delivery group which doesn’t have priority (Fail over priority can be defined for delivery group) defined. Delivery group is going to distribute users across the VM . Incase of one of datacenter goes down SQL connection will failover to other site. This will have to wait till DNS update happen and listner group IP is changed to other site. Then we will be using connection leasing feature of XD 7.6 which is similar to LHC of XenApp 7.6 .

Drop a note incase you have question.

Saturday, October 18, 2014

Prepopulating Citrix Receiver within ICA session.

We get the requirement quite   often that once users logged into virtual desktop application should launch via seamlessly. Here seamlessly have many meaning  and it varies from customer to customer. For example one customer would like the application to be present as a shortcut in the start menu and when users click the application it must do single sign on.  There are various way to achieve this. Once can import receiver ADM template using gpedit.msc

To prepopulate the receiver with the URL


To prepopulate url , one can do it via adm template or via Citrix HDX policy . To do it via adm template, import it into local policy and then perform following settings


Once storefront url is selected value must be entered in following format “

SalesStore;;On;Store for Sales staff” and even one doesn’t want to wish to have it. So once this is done it will prepopulate the URL.

Once url is prepopulated, SSO has to be done. To do the so , we must choose “local user name and password” and then choose Enable pass-through authentication.


This will allow single sign on and allow users to launch application seamlessly.

Tuesday, October 14, 2014

Failed to add a Failover Cluster Node because “SQL Server Agent” account name empty

I came across interesting issue on two occasion when I tried adding second node to the SQL 2012 cluster node. After it detecting the second server detail, account name for “SQL Server Agent”  is blank. After we typed password this still fail with error message “There are validation error on this page”


We tried rebooting boxes but that didn’t help. Finally to fix this we need to create

1. SQL Server agent 2. Add the same agent as fail over cluster resources.

You can do this steps on any of the fail over cluster node. Use following PS editor to run the command


$ClusterName = "YourClusterName"
$FciClusterGroupName = "SQL Server (MSSQLSERVER)" # may need to modify to reflect your environment

Add-ClusterResourceType -Name "SQL Server Agent" -Dll "sqagtres.dll" 

Output of command will be like this


Once this is done,select role –>Add Resource –> More Resources –>


More Resources –> SQL Server Agent


Select “New SQL Server Agent” and --->properties –>Dependencies select resource as “SQL Server”


Now select properties tab and type  InstanceName = <Name of the SQL server Instance name> VirtualServerName =<Name of the SQLCluster>


Now the “New SQL Server agent”  will start


Make sure the registry on primary server is set to 1


After above steps when setup is run again , it was able to see SQL Server Agent users name.


Yeah I am also a SQL expert Smile

Source here

Thursday, May 22, 2014

Citrix Profile and folder redirection without Microsoft GPO

Sometimes you have a situation where profile and folder redirection can not be done via Windows GPMC. Citrix provide you an option to do so via HDX policy. Citrix have inbuild policy which can used to achieve this. This way we may not require help from AD team and can be managed at our own. I am not going to explain  what all we can apply as part of UPM because everything is available here , here and here.  Profile and redirected folder path must be different .

1. To get this first make sure path is define in this way for each of the folder redirection highlighted in red


Along with each of the folder redirection make sure that “Redirect settings for <folder name>” is selected to “Redirect to the following UNC path”.

2. Make sure policy is applied to the users group


3. For UPM alone path should be set to \\path to folder\#SAMaccountname#or %username% also make sure following should be defined


For rest of the settings and best practices please follow the above mention 3 link .

Gud luck for not using Microsoft GPO :)

Thursday, April 17, 2014

Expand vDisk for PVS 7.1 on Hyper-V

There are many article which talks about vDisk expansion on different version of PVS but couldn’t find one for PVS 7.1 using windows 2012R2. Here I am sharing what I have done. Download vhdtool.exe from here. After downloading the tool follow this command as shown below image

Now open disk management on any machine and attach the vhd image

Once disk is attached it will showup as expanded volume . Select the disk and then choose extend volume.


Select the entire size and then next


Detach the hard disk post expansion


Thursday, March 6, 2014

PVS streamed Win2012R2 /Win7 and NIC fail over.

In this video I am trying to show how NIC speed varies for windows 2012R2 vs Win7. As you know , HyperV support PXE on legacy nic at the speed of 100MB. Streaming VM’s over 100MB would be really challenging .  Windows 2012R2 VM does fail over the network from legacy NIC to Synthetic NIC as shown over the video whereas Windows7 only use synthetic nic for VM traffic and streaming continue over legacy network. In this video, I tried copying file to PVS streamed  windows 7 and all the activity happening over synthetic NIC whereas streaming continue over legacy NIC.

Tuesday, March 4, 2014

PVS streamed machine showing error: Network_Boot_Duplicate_Address

PVS environment has been setup using following post . When windows 2012R2 targets where booted it throws error “NETWORK_BOOT_DUPLICATAE_ADDRESS”


Since we had two DHCP server, we thought this may be the reason why it is having duplicate IP issue. But found CTX132133 explain similar issue with PVS 6.1. Decided to try the work around mention in CTX.image

This worked.

Tuesday, February 25, 2014

Reviewed by me: Getting Started with Citrix® Provisioning Services 7.0

I had been approached by Packt  Publishing to review the book  “Getting Started with Citrix® Provisioning Services 7.0” . The book explain each and every feature of PVS 7.0 which is most exciting product from Citrix. Author Puthiyavan Udayakumar has done justice to the interesting product from Citrix .


About me mention in this box by publisher


So what all you are going to learn from the book :

  • Install Citrix Provisioning Services
  • Configure Citrix Provisioning Services
  • Create and manage Vdisks
  • Prepare a Master Target device
  • Manage farms, stores, sites, and the Provisioning server
  • Upgrade farms and Vdisks

You can download the book in various format including PDF and kindle image

Post reading please do provide your review at Amazon.

Thanks for reading

DHCP failover scope : Please delete the scope from the relationship

I was trying to remove scope and it was throwing error “Scope is part of failover relationship . Please delete the scope from the relationship” image

I tried removing from the scope but there were no option to do so.


If one has to remove the failover scope, it has to be done from IPV4 properties and Failover


After removing the relationship , I also have to do the same from secondary server as well. Post which I was able to remove the scope without any issue.

Build high availability PVS 7.1 server using windows 2012R2 & NetScaler

While we had been creating HA for PVS for a while. Here I am going to discuss HA for PVS 7.1 at every level. For that I have consider new feature of DHCP 2012 called scope level fail over . I am also explaining new inbuilt feature of NetScaler to load balance TFTP. For  PVS data store  we have used CIFS share directly from storage.  When we have two DHCP server ensure that both the IP address is added as an IP helper in the targets VLAN or else target won’t get IP address. I have created multi-homed PVS , one dedicated for TFTP and other for DHCP traffic. PVS is virtual with 16GB of memory.

To start with we have used two PVS server and install TFTP/DHCP role on it. After creation of scope we configure it for failover. Right click on DHCP scope and then you will get an option to configure failover.


This will bring info about scope


This will prompt for other DHCP server we need to create scope level fail over. Do remind you scope is created on first server and its get replicated to second server. While adding it will list all the authorized DHCP server. In our case we will choose second PVS server.


Once partner is selected


It will prompt for using existing relationship. In my case I wanted to configure DHCP in  “Load Balance ”  mode rather than “Hot Standby “ mode. This way I want to direct traffic to both the DHCP (PVS ) server.


Once this done it will present summary of what its going to configure image

Post finishing config it will congratulate you Smile 


Make changes on one DHCP scope its get replicated by itself or you have an option to replicate the change manually


Now take a route to load balance NetScaler . There are ton’s of method exist and has been documented like this or CTX116337 or wonderful blog from Nick . But with version 10.1 TFTP load balancing had became damn easy. Few click and all done. How about  Citrix  providing  some wizard for this as well…you lazy guys.

To start with create server under  Traffic management . Here give IP address of  PVS server. Incase PVS is multi homed then we need to supply IP of streaming network. Both the PVS server has been added and green shows SNIP is able to communicate with PVS server.


Now configure service for those PVS server and here don’t forget to choose protocol as TFTP . Under server both the PVS server will be listed which has been created in previous step. Rest all are default. Here green shows all well with service.


Now create vServer and map both the services which we have created in previous step. IP address mention here will be used in DHCP option 66. Rest all setting will be default. I love Round Robin so I have chosen that. That’s it , IP will be ready to be configured under DHCP scope.


Modify the 66 option  under scope and you will be ready to test TFTP HA 


In the last part I will show how we configure CIFS share to be used as datastore for PVS. On a storage create CIFS share and then create folder as per store create folder. I have create folder by name CTX_ADMIN and mapped it store with same name. Once this is mapped to both the PVS end to end HA can be tested.


When I boot my target its boot fine.