Objective
This article describes High Availability (HA) features new to XenDesktop 5 and how to implement them.
This article is intended for single site deployments and applies to all XenDesktop 5.x releases (5.0, 5.0 Service Pack 1, 5.5, 5.6, 5.6 Feature Pack 1).
Background
The XenDesktop 5 architecture includes quite a few technology changes from previous versions and as such this article shows some of the new features as well as using XenDesktop with other Citrix products to create a High Availability environment. See CTX127563 -Disaster Recovery Guide for XenDesktop 5 using NetScalerto know how to use XenDesktop 5 in a Disaster Recovery configuration.
Instructions
XenDesktop High Availability Features
Features specific to XenDesktop 5 include:
High Availability features in the Virtual Desktop Agent
No zone master controller
The High Availability feature in the Virtual Desktop Agent (VDA) allows the users to connect directly to the VDA should the controllers fail. In this mode, the VDA accepts direct HDX connections from the users, rather than the normal connections brokered by a controller. This feature is designed for use on the rare occasion that a controller fails and is not an alternative to other forms of HA. Note the following limitation - VDA HA only works with dedicated desktops; it cannot be configured to work with pooled desktops.
Some normally available features become unavailable when running the VDA in a HA scenario:
User Roaming: The desktop only accepts one connection and does not allow connections from another device while connected.
Power Management: The desktop powers up, attempts to register with the controller, and once the registration fails, then enters HA mode.
Controller originated policies: Because HA mode is only triggered by a failure to register with a XenDesktop Controller; it is not possible to apply controller based policies. Domain-based and Local Group Policies are unaffected.
Access Gateway and Remote Access.
HA mode persists for 30 days. After this time, the desktop is no longer available until registration is successful again. This means the administrator has 30 days to repair the controller infrastructure – you should not become reliant upon high availability mode.
The XenDesktop 4 zone master principle no longer applies to XenDesktop 5. This means that there is no longer a single point of failure for desktop brokering. Controllers communicate directly with the database and not with each other. This means a single controller failure has no effect on other controllers but also means that the database becomes a single point of failure. If the database server fails, existing desktop connections continue to function; however, once the user logs off or disconnects, the user cannot re-connect. It also means new connections fail. See theSQL HAsection for increasing resilience of SQL server.
XenServer 5.6 and later High Availability Features
Features specific to XenServer 5.6 and later releases include:
池HA特性。
XenServer HA enables simple, automated failover of virtual hosts ensuring that affected hosts are automatically restarted. With HA, XenServer monitors the health of the hosts within a pool. The HA mechanism automatically moves protected virtual machines to healthy host if a host fails. Should the pool master fail, HA automatically selects another host to take over the master role.
SQL HA
Because XenDesktop 5 relies heavily on SQL, it is important that the SQL Server is not a single point of failure. There are several options for creating a HA SQL deployment.
SQL Mirroring: This is the recommended solution. Mirroring the database ensures that, should you lose the active database server, the automatic failover process happens quickly in a matter of seconds, so users are generally unaffected. This method, however, is more expensive than alternative solutions because full SQL server licenses are required on each database server; you cannot use SQL Express.
Using the hypervisor's high availability features: With this method, you deploy the database as a virtual machine and use your hypervisor's high availability features. This solution is less expensive than mirroring because it uses your existing host software and you can also use SQL Express. However, the automatic failover process is slower because it can take time for a new machine to start for the database, which might interrupt the service to users.
SQL Clustering: Microsoft's SQL clustering technology can be used to automatically allow one server to take over the tasks and responsibilities of another server that has failed. However, setting up this solution is more complicated, and the automatic failover process is typically slower than with alternatives such as SQL Mirroring.
For more information on configuring XenDesktop 5 for use with a Mirrored SQL server, see CTX127359 –How to Configure XenDesktop for SQL Database Mirroring
Configuring High Availability
Configuring High Availability of the Virtual Desktop Agent
完成以下步骤来启用高availability mode:
Set the HighAvailability and HaRegistrarTimeout registry keys.
Provide users with an ICA launch file that enables them to make direct ICA connections.
Note: You must create an ICA file for each user who requires this feature; Citrix does not create or distribute ICA files for this purpose.
Setting the Registry Keys
To configure the VDA so that it operates in high availability mode when necessary, add the following registry key(s). You must do this after installing the VDA.
Caution!Refer to the Disclaimer at the end of this article before using Registry Editor.
InHKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ VirtualDesktopAgent,add the following registry entry (of type REG_DWORD):HighAvailability.
Set this to1to enable high availability mode.Note: Setting it to0(zero) disables high availability mode.
To change the time period that the VDA tries registering with the controller before initiating high availability mode, add the following registry entry to the location (of type REG_DWORD):HaRegistrarTimeout.
Specify the number of seconds. The default is300seconds.Restart the virtual desktop.
Preparing an ICA Launch File
To establish a direct ICA connection to desktops, you must provide the users with an ICA launch file that they can use and should communicate with the controller when the controller fails. You must create an ICA launch file for each user who requires this feature; Citrix does not create or distribute ICA files for this purpose. For information on how to create ICA files, seeCTX127392 –How to Create ICA Launch Files for High Availability Mode.
Note: You must inform the users when it is appropriate to use this ICA launch file and where they can access it.
Configuring XenServer High Availability
To configure XenServer HA, the following items are required:
Shared storage using either iSCSI or Fiber Channel is required. This is used to house the heartbeat volume (around 4 Megabytes) and the metadata volume (around 256 Megabytes)
A XenServer pool
Enterprise licenses for all hosts
静态IP addresses for all hosts
Protected virtual machines must:
Use shared storage for virtual disks
Must not have a local DVD configured
Must use Pool-wide virtual network interfaces
Note: Should the IP address of a server change while HA is enabled, HA assumes that the host's network has failed, and probably fences the host and leaves it in an unbootable state. To remedy this situation, disable HA using thehost-emergency-ha-disablecommand, reset the pool master usingpool-emergency-reset-master, and then re-enable HA.
Open XenCenter, select the XenServer pool and then select theHAtab.
ClickEnable HAto start the HA configuration wizard.
On theWelcomepage, clickNext.
Select the storage repository for the heartbeat. Only suitable storage repository (SR) types are selectable, unsuitable SR types are unavailable.
Select the appropriate protection levels for each virtual machine in the pool. The following three options are available:
Protected——这些虚拟机为主。
Restart if Possible– These virtual machines are started if resources are available.
Do Not Restart– These virtual machines are not restarted.
Set important infrastructure virtual machines toProtectedmode (brokers, Web Interface, NetScaler virtual appliances). Set dedicated desktop and assigned desktop virtual machines toRestart if Possible, and set pooled desktop virtual machines toDo Not Restart.
Note: Failure tolerance is the number of servers that might fail while still having enough resources to restart all virtual machines in the pool. Be aware that adding virtual machines later can affect this tolerance level.
Review the configuration and clickFinishto enable HA.
HA is now enabled.
Additional Resources
CTX124889 –XenServer 5.6 Installation Guide
Citrix eDocs -XenApp and XenDesktop