Citrix 7.X – Upgrade Sequence and Procedures

Prerequisites

Back up the site, monitoring and configuration logging databases.

Microsoft SQL Server Express LocalDB is installed automatically, the new version must be at least SQL Server Express 2017 LocalDB CU16

Ensure that your Citrix licensing is up-to-date

Preliminary site tests

When we upgrade Delivery Controllers and a site, preliminary site tests run before the actual upgrade begins. These tests verify:

• The site database can be reached and has been backed up
• Connections to essential Citrix services are working correctly
• The Citrix License Server address is available
• The configuration logging database can be reached

After the tests run, we can view a report of the results. We can then fix any issues that were detected, and run the tests again. Failure to run the preliminary site tests and then resolve any issues can impact the Citrix site functionality.

The report containing the test results, it is an HTML file (PreliminarySiteTestResult.html) in the same directory as the installation logs and the file is created or overwritten.

SQL Server version check – Upgrading SQL Server or Replace SQL Server Express LocalDB

These are the steps in upgrading Citrix 7.X.

  1. Upgrade StoreFront
  2. Upgrade Director
  3. Upgrade Citrix Provisioning
  4. Upgrade half of Delivery Controllers
  5. Upgrade Studio
  6. Upgrade database and site
  7. Upgrade remaining Delivery Controllers
  8. Upgrade VDAs
  9. Update machine catalogs and Delivery Groups

The upgrade causes only a brief interruption in establishing new client connections during the final database upgrade steps. The upgraded Controllers cannot process requests until the entire site is upgraded. So if your site has only one Controller, it is inoperable during the upgrade. During a database upgrade, product services are disabled. During that time, Controllers cannot broker new connections and require downtime.

Posted in Citrix, Citrix XenApp, Citrix XenDesktop | Tagged , , , ,

Provisioning and updating the machines through Citrix MCS

Machine Catalogs

1. Right-click Machine Catalogs and click Create Machine Catalog.
2. Select the Server OS.
3. Select Machines that are power managed and Deploy machines using MCS.
4. Select the snapshot of the virtual machine (mostly we select the recent snapshot).
We can select the virtual machine as a source, and this will also work without any problems. But we will lose control over the image management.
5. Choose how many VMs are required and select the default configuration for the Virtual machines.
6. Now we need to create machine account in AD. Select the OU in which the machines to be created and provide the naming conversion to be used
7. Finally check all the configuration and choose the Machine Catalog name and click Finish.
8. We can see the machines are being created in VMware vSphere and in AD.
9. The machines will be shutdown until the machines are assigned to a Delivery Group and then they start automatically.

create mc

Delivery Groups

10. Select Delivery Groups and create a Delivery Group.
11. Select the previously created Machine Catalog and enter the number of machines need to be added. Usually we select all the number of virtual machines that we have created.
12. Select the Users or a security group for accessing the Delivery Group.
13. We can publish applications or desktop.
14. Give the Delivery Group name.
15. Now the machines should automatically power on and it may take few minutes for all the machines to come up.

Update Machine Catalog

After the application upgrade or any modification in the Master image we will need to deploy new updated image to all the Citrix Servers in the Delivery Group.

1. Power off the Master Server.
2. From VMware vCenter take the Snapshot of the Master Server and give appropriate name to the snapshot.
3. Logon to Citrix Studio, select the machine catalog need to be updated. Right click and select Update Machines.
4. Select the latest snapshot of the Master Image and click Next. Master image is also known as clone, golden or base image
5. On the Rollout Strategy page, select immediately and update all machines at the same time. if there are more number of machines choose accordingly.

rolluour stat
6. Click Finish to roll out the new image to all the Citrix servers in the Delivery Group.
7. After Finishing verify the Citrix servers and make sure that new application changes are reflecting in the servers.
8. Now the servers should be in registered state.

Posted in Citrix, Citrix XenApp, Citrix XenDesktop | Tagged , , , , ,

PS Script to Get License Count

$LicenseServer1=’CLSRV01′
$LicenseServer2=’CLSRV02′
$LicenseServer3=’CLSRV03′

# Get Citrix Licensing Info from WMI
$LicensePool1 = Get-WmiObject -ComputerName $LicenseServer1 -Namespace “ROOT\CitrixLicensing” -class “Citrix_GT_License_Pool” -filter “pld=’XDT_PLT_UD'”
$LicensePool2 = Get-WmiObject -ComputerName $LicenseServer2 -Namespace “ROOT\CitrixLicensing” -class “Citrix_GT_License_Pool” -filter “pld=’MPS_PLT_CCU'”
$LicensePool3 = Get-WmiObject -ComputerName $LicenseServer3 -Namespace “ROOT\CitrixLicensing” -class “Citrix_GT_License_Pool” -filter “pld=’MPS_PLT_CCU'”

# Calculate licenses in use, total number of licenses and percentage currently in use
$InUseNum1 = ($LicensePool1 | Measure-Object -Property InUseCount -sum).Sum
$InstalledLicNum1 = ($LicensePool1 | Measure-Object -Property Count -sum).Sum
$PercentageNum1 = [math]::round(($InUseNum/$InstalledLicNum1)*100,2)

$InUseNum2 = ($LicensePool2 | Measure-Object -Property InUseCount -sum).Sum
$InstalledLicNum2 = ($LicensePool2 | Measure-Object -Property Count -sum).Sum
$PercentageNum2 = [math]::round(($InUseNum/$InstalledLicNum2)*100,2)

$InUseNum3 = ($LicensePool3 | Measure-Object -Property InUseCount -sum).Sum
$InstalledLicNum3 = ($LicensePool3 | Measure-Object -Property Count -sum).Sum
$PercentageNum = [math]::round(($InUseNum/$InstalledLicNum3)*100,2)

# Check the usage and send an email if the license usage is over 1% so we get the number of users accessing Citrix
if ($PercentageNum1 -lt 1)
{
}
else
{
Send-MailMessage -To “murugan@myxenapp.com” -Subject “Citrix License Server Status $LicenseServer1” -Body “The Citrix license server is $LicenseServer1 `n`nTotal Available Citrix Licences: $InstalledLicNum1`nCurrent Licences In Use: $InUseNum1`nPercentage Of Licenses In Use: $PercentageNum1%” -SmtpServer “SMTP.myxenapp.com” -From “admin@myxenapp.com”
}

if ($PercentageNum2 -lt 1)
{
}
else
{
Send-MailMessage -To “murugan@myxenapp.com” -Subject “Citrix License Server Status $LicenseServer2” -Body “The Citrix license server is $LicenseServer2 `n`nTotal Available Citrix Licences: $InstalledLicNu2`nCurrent Licences In Use: $InUseNum2`nPercentage Of Licenses In Use: $PercentageNum2%” -SmtpServer “SMTP.myxenapp.com” -From “admin@myxenapp.com”
}

if ($PercentageNum3 -lt 1)
{
}
else
{
Send-MailMessage -To “murugan@myxenapp.com” -Subject “Citrix License Server Status $LicenseServer3” -Body “The Citrix license server is $LicenseServer3 `n`nTotal Available Citrix Licences: $InstalledLicNum3`nCurrent Licences In Use: $InUseNum3`nPercentage Of Licenses In Use: $PercentageNum3%” -SmtpServer “SMTP.myxenapp.com” -From “admin@myxenapp.com”
}

Posted in Citrix XenApp

Scaling Citrix environment

sizeCitrix XenApp can scale to meet the most demanding and complex business environments. This information helps to maximize the business requirements to provide a scalable and high availability infrastructure while delivering on-demand access to applications and information for the enterprise.  The requirements and associated solutions are consistent with the business needs and challenges that are common to most large scale organizations.

How much storage is needed for the Citrix Datastore?

The Database file size during initial farm creation is around 1184 KB. Adding a server to the farm required 88 KB.
Application publication with 10 Citrix servers with 500 users with default icon required 296 KB.
Application publication with 10 Citrix servers with 5 user groups with default icon required only 40 KB.
Application published in 32-bit color icon required 24 KB. Application published in 256-bit color icon required 48 KB.
Creating a worker group required 2 KB. Creating one load evaluator required 8 KB. Apply load evaluator for 10 servers required 16 KB.

Creating a farm with 1000 servers and 1000 published applications, 100 worker groups to serve as applications silos and 10 load evaluators, the IMA data store size requirement will be approximately 500 MB.

A published application with 32-bit icon consumes about 65KB of memory  on the data collector. The average user session consumes approximately 1.6 KB of memory on the data collector. The average Citrix server consumes approximately 210 KB of memory on the data collector.

Resource utilization of the License server?

A single license server can adequately handle the load placed on it by a thousand servers and tens of thousands of users.  The license server uses approximately 4.5KB of memory for every session license and 39KB of memory for every start-up license that is in-use. The license server is capable of processing 248 license check-out requests per second. In a given scenario with all users logging in over the course of 30 minutes, a single license server would be able to handle 446400 users.

When a XenApp server comes online, it establishes a static connection to the license server and checks out a Citrix startup license. Also every 5 minutes, the XenApp servers will contact the license server to ensure it is still available. This action consumes 1.68 KB of bandwidth and occurs for every server in the farm. Once a startup license is checked out, the server holds this license until it is taken offline or the license server location is changed.

When a client logs in, the XenApp server requests a license from the license server on behalf of the client. The amount of bandwidth consumed for a license check-out request or check-in request is 1.04 KB. Every 5 minutes, each XenApp server exchanges a heartbeat with the license server to check license server’s availability and it requires the bandwidth of 366 bytes for each server. The timing of the heartbeat is based on the start time of the IMA Service.

Web Interface server requirement

The number of users that a single Web Interface server can support is dependent on the processor speed rather than the number of processors in the system.  Web Interface server with Windows 2008 R2 / IIS 7.0 / Intel Xeon X3360 dual core 2.2 GHz processor with 2GB of RAM is able to handle 9 user requests per second. Approximately the Web Interface server can service 30,000 users per hour.

Knowing Group Policy Management refresh intervals

When Citrix policies are managed from the AD domain group policy, the sequence of policy refresh and update is as follows:

1. change is made on the GPMC
2. within 1½ to 2 hours, member servers pull and apply updates
3. every 3 hours, AD replication occurs between domain controllers
4. within 1½ to 2 hours, remote member servers pull and apply updates

Resource utilization of IMA Communications

After the XenApp server starts, every 30 minutes the local host cache will perform a consistency check to ensure it is in sync with the Datastore. Every 60 seconds the Data Collector will send an IMAPing to  ensure the  member server is alive.

Planning worker groups

Adding 200 worker groups will increase 2.5 seconds for the management console discovery time, while 500 worker groups increase the discovery time by 4.2 seconds. Worker groups and their memberships are cached in memory in every IMA service for performance. This will increase the memory consumption of about 8 KB for every worker group in the farm.

Posted in Citrix XenApp

How to Rebuild WMI service

net stop winmgmt
c:
cd %systemroot%\system32\wbem
rd /S /Q repository

regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll

mofcomp cimwin32.mof
mofcomp cimwin32.mfl
mofcomp rsop.mof
mofcomp rsop.mfl
for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
for /f %s in (‘dir /b *.mof’) do mofcomp %s
for /f %s in (‘dir /b *.mfl’) do mofcomp %s

Recompile Citrix .MOF files:
cd %programfiles%\citrix\system32\citrix\wmi
for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s
net start winmgmt

Posted in Citrix XenApp