Citrix Interview Questions and Answers
What is a Data Store?
This is the place where all the static information are stored. The data store provides a repository of persistent information about the farm (Farm configuration information, Published Application configurations, Server configurations, Static policy configuration, XenApp administrator accounts, and Printer configurations) that all servers can refer.
The data store is the central repository where almost the entire Citrix implementation is invested. The Administrators of the farm, the license server to point to, the whole farm configuration, the published applications, all their properties, the security of who gets access to what, the custom load evaluators, custom policies, configured printers and print drivers, all this is stored in the central repository called the data store.
What is Zone Data Collector?
Data Collector stores all the dynamic information like session, load and published applications in the servers in their zones and communicates the zone information to the Data Collectors in other zones in the farm
Data collector is a Citrix Presentation Server whose IMA service takes on the additional role of tracking all of the dynamic information of other Presentation Servers. This information is stored in memory and called the “dynamic store”. The data store is a database on disk. The dynamic store is information stored in memory.
To look the contents of the in-memory dynamic store on the data collector, use “queryds” command. QueryDS can be found in the "support\debug" folder of your Presentation Server installation source files.
To determine which server is acting as the data collector in the zone run "query farm /zone" from the command line
What is a Farm?
A Farm is a group of Citrix servers which provides published applications to all users that can be managed as a unit, enabling the administrator to configure features and settings for the entire farm rather than configuring each server individually. All the servers in the farm share a single data store.
A server farm is a grouping of servers running Citrix Presentation Server that can be manage as a unit, similar in principle to a network domain. When designing server farms, keep in mind the goal of providing users with the fastest possible application access while achieving the degree of centralized administration and network security that you need.
What is LHC?
The IMA service running on each Presentation Server downloads the information it needs from the central data store into a local MDB database called the local host cache, or “LHC.” (The location of the local host cache is specified via a DSN referenced in the registry of the Presentation Server, at HKLM\SOFTWARE\Citrix\IMA\LHCDatasource\DataSourceName. By default this is a file called “Imalhc.dsn” and is stored in the same place as MF20.dsn.)
Each Presentation Server is smart enough to only download information from the data store that is relevant to it, meaning that the local host cache is unique for every server. Citrix created the local host cache for two reasons:
1. Permits a server to function in the absence of datastore connectivity.
2. Improves performance by caching information used by ICA Clients for enumeration and application resolution.
The LHC is an Access database (Imalhc.mdb) stored default in the path "<ProgramFiles>\Citrix\Independent Management Architecture" folder.
LHC contained the following information:
1. All servers in the farm, and their basic information.
2. All applications published within the farm and their properties.
3. All Windows network domain trust relationships within the farm.
4. All information specific to itself. (product code, SNMP settings, licensing information)
The LHC is critical in a CPS environment. In fact, it's the exclusive interface of the data store to the local server. The local server's IMA service only interacts with the LHC. It never contacts the central data store except when it's updating the LHC. If the server loses its connection to the central data store, there's no limit to how long it will continue to function. (In MetaFrame XP, this is limited to 48 or 96 hours, but that was because the data store also store license information.) But today, the server can run forever from the LHC and won't even skip a beat if the central connection is lost. In fact now you can even reboot the server when the central data store is down, and the IMA service will start from the LHC with out any problem. (Older versions of MetaFrame required a registry modification to start the IMA service from the LHC.)
The LHC file is always in use when IMA is running, so it's not possible to delete it or anything. In theory it's possible that this file could become corrupted, and if this happens I guess all sorts of weird things could happen to your server. If you think this is the case in your environment, you can stop the IMA service and run the command "dsmaint recreatelhc" to recreate the local host cache file, although honestly I don't think this fixes anything very often. Local Host Cache is synchronised with the Data Store by the Zone Data Collector for every 30 minutes and it can also be configured through registry
What is Zone?
Zone is subset of Farm. It is a grouping of Presentation Servers that shares the common Data Collector. Zones are very helpful in controlling traffics. It collects data from member servers and distributes changes to all servers in the farm. A zone in the Presentation Server farm elects a zone data collector for the zone and it is responsible to communicates between other ZDCs in the farm. It is used to redirect the users to least busy server. The ZDC maintains all load and session information for every server in the zone. ZDCs keep open connections to other ZDCs changes in the member servers of a zone and are immediately propagated to the other ZDCs in the farm. Zone has server members and one of them is ZDC (Zone Data Collectors) in each zone. These ZDCs communicate between zones. Zones are very help full in controlling traffic. We can move the servers among the zones and after moving the servers from one Zone to another the servers must be restarted to get settings and configurations from the DataStore
How to Refresh the Local Host Cache?
If the IMA service is currently running but published applications do not appear correctly in ICA Client application browsing, force a manual refresh of the local host cache by executing dsmaint refreshlhc from a command prompt on the affected server. This action forces the local host cache to read all changes immediately from the data store.
A discrepancy in the local host cache occurs only if the IMA service on a server misses a change event and is not synchronized correctly with the data store.
Explain Citrix Load Levels?
We can get Citrix Load levels from QSERVER /APP and QFARM /APP at the command prompt. Load values can be inbetween 0-10000.
The following are explanations of the load levels:
9999 : No load balancing installed
0 to 9998 : “normal” load level
10000! : Application is disabled for this server
10000 : Load is at 100%
10001 : Out of licenses
10002 : Indicates that no ICA connections, listener is disabled, are available on that server.
A few other conditions also cause this code to be returned:
<> If logons have been disabled on the server
<> If the server is out of swap space - check load balancing administration and change pagefile from 2097152 to 500 on the problem server. If the application is disabled
<> If it is an anonymous application and no logons are left for anonymous users
<> For multi-homed servers, the selection for LAN adapter is “All network adapters configured for this protocol” instead of a specific LAN adapter
<> Check the connection limit on all listener ports (ICA, and RDP) because this has been found to affect the load balancing parameters and cause the 10002 load level.
<> If the connection limit has been changed from “unlimited” to “2,” you may not be able to connect to a published application and will get the error message: “Cannot connect to the Citrix server. The Citrix server you have selected cannot be located.”
<> You may also delete and recreate the listeners for that protocol and reorganize the pagefile. If the servers are built from a ghosted image, it may be necessary to delete the pagefile, recreate the pagefile, and reboot the server.
How to clone a XenApp 6.5 server with VMware
I have been working with XenApp a lot just lately and I find myself knee-deep in the Citrix e-docs a lot. However I think that they don’t cover some topics particularly well, especially when they don’t seem to want to acknowledge that other vendors exist.
So, here are my simple steps using VMware and Citrix. You don’t need to bother with provisioning server etc. I am aware that there are many ways of doing this but I consider myself to be a Citrix novice so keeping it simple is the way to go!!
Please note this was done on a 2008 R2 server running XA 6.5 FP1.
• Ensure that you have configured a guest customisation script in your virtual centre. If you don’t you could use Sysprep, I would suggest using generalize and oobe.
• Jump onto a XenApp server, so long as it’s not the first server in the farm, as you should not image that. Ensure that you have all of your apps installed and configured and ensure that no users are logged in.
• Open the Citrix role manager. Select the XenApp role and click configure. If you cannot find it either someone has uninstalled it or go and find it under C:\Program Files (x86)\Citrix\XenApp\XenAppServerRoleManager\
Citrix Role Wizard
• Select to prepare the server for imaging
Citrix Role Wizard
• Now I wanted my server that I was imaging to remain in the farm, so I unchecked the top tick box. This means that my server will just rejoin the farm after the next reboot. This also means that I don’t want the database locations to be wiped. So I left the bottom check box clear. This also means that I didn’t have to create any policies to set the server information.
Citrix Role Wizard
• Finish the wizard and go to services. You will need to stop and disable the Citrix IMA service
• Now, if you’re not using a VMware customisation script, now would be the time to use Sysprep. You will find Sysprep in C:\windows\system32\sysprep
• Now shut the server down and use VMware to clone the server, your customisation script should rename the server and sysprep the machine. I am not going to detail these steps, but if you get stuck drop me a comment and I will give you a hand :)
• You could now power up the machine that you imaged and set the IMA service to automatic and start it up.
• Then you can power up your clone and do the same with the services, but only after you have checked over Windows.
That should be job done, clearly you could do multiple clones and you could do a clone to template but there may be some other caveats there, so I would do a little R&D before you do that.
Hope this helps someone out.
How to create a XenApp 6.5 Server 2008 R2 golden image for PVS 6.1
I urge you to read my PVS 6.1 on XenDesktop/Windows 7 guide first. Read it and make sure you understand it. The same concepts and most all procedures apply to Server 2008 R2. So I am not going to get as detailed on PVS technology in this article. This is going to be more XenApp centric. If you don’t have a thorough understanding of PVS, it is easy to become lost so please make sure and read that article and go through those screenshots first.
Citrix has an excellent eDoc primer for understanding the intricacies of XenApp on PVS located here. I recommend skimming this before beginning:
http://support.citrix.com/proddocs/topic/xenapp65-install/ps-image-prep.html
Now on to the steps. This is just my way of doing it. It works well for me. There are a couple of different ways you can achieve the same thing so use what works for you:
1. I am assuming you already have a XenApp 6.5 farm created and at least one dedicated server for the role of the ZDC. All XenApp servers provisioned via XenApp will be member servers of this farm and you do not want them to become a ZDC. Just set the election preference in AppCenter under Zones. In this example, I have a Default Zone and have set one server as the ZDC but it is best practice to have at least a handful of servers that are not provisioned to be set as preferred. Just in case one goes down, you don’t want one your provisioned servers to become a ZDC:
I urge you to read my PVS 6.1 on XenDesktop/Windows 7 guide first. Read it and make sure you understand it. The same concepts and most all procedures apply to Server 2008 R2. So I am not going to get as detailed on PVS technology in this article. This is going to be more XenApp centric. If you don’t have a thorough understanding of PVS, it is easy to become lost so please make sure and read that article and go through those screenshots first.
Citrix has an excellent eDoc primer for understanding the intricacies of XenApp on PVS located here. I recommend skimming this before beginning:
http://support.citrix.com/proddocs/topic/xenapp65-install/ps-image-prep.html
Now on to the steps. This is just my way of doing it. It works well for me. There are a couple of different ways you can achieve the same thing so use what works for you:
1. I am assuming you already have a XenApp 6.5 farm created and at least one dedicated server for the role of the ZDC. All XenApp servers provisioned via XenApp will be member servers of this farm and you do not want them to become a ZDC. Just set the election preference in AppCenter under Zones. In this example, I have a Default Zone and have set one server as the ZDC but it is best practice to have at least a handful of servers that are not provisioned to be set as preferred. Just in case one goes down, you don’t want one your provisioned servers to become a ZDC:
2. Now go to your XenServer and create a new Server 2008 R2 VM
3. Install XenServer Tools
4. Make a copy of the VM and convert it to a template. This is your “clean” Server 2008 R2 image you can come back to later if you need to. You can spin up new VMs from it.
5. Now go back to the VM you were working on and install things that are needed on all servers like Symantec, Citrix Offline Plugin (if you intend to leverage app streaming), etc. but try to keep it as clean as possible. Remember, you are building just the base right now. Don’t install any applications you plan to publish yet.
6. Add the server to the domain. Make sure the name is the first server in your naming scheme, example: “ServerName-100″ where 1 denotes the image number and 00 is the VM number. The next VM that gets spun up using this image will be ServerName-101 and so on.
7. Begin installation of XenApp 6.5 like normal and follow Approach 3 detailed here:
http://support.citrix.com/proddocs/topic/xenapp65-install/ps-image-prep.html
8. If you have multiple NICs in your PVS environment for streaming vs. regular network traffic there’s an extra step you have to perform in the VM. Make sure you go into ICA Listener properties and set it to PVS Adapter #1, the network NIC. Not the PVS streaming NIC which is #0. They may be labeled differently in your environment depending on the NIC order of your VM. Just remember, you want the network NIC to handle ICA, not the streaming NIC.
9. Now install the apps you intend to publish. Just install, don’t try publishing anything yet. If you plan on streaming apps to your XenApp servers via Citrix Offline Plugin or App-V, skip this step.
10. Install the PVS Target and reboot. Do not run Imaging Wizard yet.
11. You can choose to install the EdgeSight agent at this point if you use EdgeSight in your environment. There is an excellent guide from Citrix on how to install EdgeSight in a PVS environment below. Don’t worry, when it detects the PVS Target software is on the system and the image is in private mode being updated, it won’t start the EdgeSight service and start sending your EdgeSight server junk data:
http://support.citrix.com/proddocs/topic/edgesight54/es-agent-install-streamed.html
12. Log back in to the VM and in the XenCenter console, set the PVS boot disk to boot first (BDM). Then go to the PVS Console on the PVS server and create a new Device with the MAC address of this VM’s provisioning/streaming NIC. Call the device ServerName-101 so it’s separate from the ServerName-100 original but call the vDisk 100 so you know where the image came from later (i.e. image 1). Set device to Boot from Hard Disk. Now reboot the VM. You can let Imaging Wizard do this but if you really want to be hands on, you can choose to create and attach an empty vDisk of the same size as the c: drive of the VM now.
13. It should have booted from the BDM boot disk and be connected to the empty vDisk you created. Run Imaging Wizard and push the image across to the PVS Server vDisk (don’t forget to optimize the image). If you did not create a vDisk in the above steps, just create a new disk and run through the Wizard prompts to create it real quick. It will assign the device to this new vDisk. Reboot when you are asked to.
14. Log back in and immediately XenConvert will launch and begin pushing your image over to the newly created vDisk.
15. Now go to the PVS console and set your device to boot from vDisk and reboot your VM. It should now be booting from your vDisk.
16. Log back in and re-run XenApp configuration and unjoin from farm using the prep option. This is done by going to Start > Programs > Administrative Tools > Citrix > XenApp Server Role Manager > and then clicking on the XenApp Server Role Manager app. Click Edit Configuration. Then click Prepare this server for imaging and provisioning. You want to just leave the defaults checked which is to remove it from the farm and join on the next boot. Once it removes it, it will ask you to reboot. Just close and power down the VM, don’t reboot.
17. Go to your PVS server and change the vdisk from private to standard mode. Now spin up a few VMs using the “Streamed VM Setup Wizard” in the PVS console. You’re going to need a template and you’re going to want to setup your write cache. I’ve covered this very well in my PVS 6.1 on XenDesktop/Windows 7 guide so I’m not going to get into the details here. Wait until the VMs are created and powered on.
18. Go to your ZDC and open up AppCenter and run a Discovery. You should see the new member servers. At this point you can begin publishing or streaming apps to them.
TO MAKE CHANGES AND RESEAL THE IMAGE
1. Boot a device into maintenance mode after creating a maintenance version on the vDisk. Or you can choose to power down all your running VMs and put the disk into private mode. Your choice.
2. Make your changes.
3. Re-run XenApp configuration and unjoin from farm using the prep option.
4. Shut it down and promote the image to production if using versioning. Or put the disk back into standard mode if you used the other method.
5. Reboot all your devices so it gets the new vdisk
I hope this guide helps. Please feel free to leave a comment below if you have any questions. I’ll try and help as best as I can.
Comments
Post a Comment