In Amazon Web Services (AWS), Amazon Elastic Compute Cloud (EC2) instances are the central part of cloud computing platform. An instance type determines the hardware of the machine. Each instance type provides different compute and memory capabilities. Amazon Machine Image (AMI) provides the set of software for the EC2 instance including the kind of OS, applications, the services.
So Amazon EC2 facilitates the scalable deployment of desired software and applications by providing a web service for the virtual machine, called as an instance.
Amazon EC2 relies on Xen Virtualization for launching its instances.
A Xen hypervisor allows multiple instances to share a single hardware platform. A hardware on which a hypervisor is running is called a Host machine and the virtual machine is called a Guest machine.
AWS supports two different types of virtualization for EC2 instances, Para Virtualization (PV) and Hardware-assisted Virtual Machine (HVM).
In terms of Xen virtualization these are called
- Xen Para-virtualization ( PV )
- Xen Full virtualization ( HVM )
These AMIs boot with a special boot loader called PV-GRUB. The guest kernel can communicate directly with the hypervisor results in greater performance but they cannot access or use the hardware extensions such as enhanced networking, GPU etc. Network performance in a Para-virtualized instance is very low. Para-virtualized AMIs support only Linux.
b. Hardware-assisted virtual machine or (Full Virtualization)
HVM instances have a fully virtualized set of hardware and they boot by executing the master boot record (MBR) of the root block device of the image. It provides the ability to run an operating system directly on top of a virtual machine. It provides complete hardware isolation. HVM instances can use the enhanced networking and GPU processing. HVM virtualization provides guest OS to pass through instructions to specialized network and GPU devices to have access to the native hardware platform. The network performance in Hardware-assisted virtual instance is low to moderate. The hardware provides support to run independently for each Guest OS. So the HVM AMIs support both Linux and Windows.
HVM machines can take advantage of hardware extensions that provide fast access to the underlying hardware on the host system.
PV drivers are now available for HVM machines, so with these drivers the HVM machines get the better performance than para virtual machines.
Citrix Director is the most powerful tool to get much historical data and current information in Citrix environment. It helps collecting the data and provide reports and information in the understandable format.
We can increase the data retention period in Citrix Director from the default 90 days to 365 days and get the report for one complete year. This is not due to the kind of Citrix license we purchased, but we have to set the configuration via PowerShell.
Run these Powershell commands on the Citrix Delivery Controller Server:
Set-MonitorConfiguration GroomApplicationInstanceRetentionDays 365
Set-MonitorConfiguration GroomDeletedRetentionDays 365
Set-MonitorConfiguration GroomFailuresRetentionDays 365
Set-MonitorConfiguration GroomLoadIndexesRetentionDays 365
Set-MonitorConfiguration GroomMachineHotfixLogRetentionDays 365
Set-MonitorConfiguration GroomMachineMetricDaySummaryDataRetentionDays 365
Set-MonitorConfiguration GroomNotificationLogRetentionDays 365
Set-MonitorConfiguration GroomResourceUsageDayDataRetentionDays 365
Set-MonitorConfiguration GroomSessionsRetentionDays 365
Set-MonitorConfiguration GroomSummariesRetentionDays 365
After running these commands we need to reboot the server or need to restart the Citrix monitoring service.
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.
- Upgrade StoreFront
- Upgrade Director
- Upgrade Citrix Provisioning
- Upgrade half of Delivery Controllers
- Upgrade Studio
- Upgrade database and site
- Upgrade remaining Delivery Controllers
- Upgrade VDAs
- 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.
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.
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.
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.
# 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)
Send-MailMessage -To “email@example.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 “firstname.lastname@example.org”
if ($PercentageNum2 -lt 1)
Send-MailMessage -To “email@example.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 “firstname.lastname@example.org”
if ($PercentageNum3 -lt 1)
Send-MailMessage -To “email@example.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 “firstname.lastname@example.org”