您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

为多层 Citrix XenApp 和 XenDesktop 部署设置灾难恢复set up disaster recovery for a multi-tier Citrix XenApp and XenDesktop deployment

Citrix XenDesktop 是一个桌面虚拟化解决方案,可以将桌面和应用程序作为按需服务传递给任何位置的任何用户。Citrix XenDesktop is a desktop virtualization solution that delivers desktops and applications as an ondemand service to any user, anywhere. 利用 FlexCast 传递技术,XenDesktop 可以快速、安全地将应用程序和桌面传递给用户。With FlexCast delivery technology, XenDesktop can quickly and securely deliver applications and desktops to users. Citrix XenApp 暂不提供任何灾难恢复功能。Today, Citrix XenApp does not provide any disaster recovery capabilities.

合理的灾难恢复解决方案应该允许围绕上述复杂应用程序体系结构为恢复计划建模,同时,可以添加自定义的步骤来处理各层之间的应用程序映射,以便在发生导致 RTO 降低的灾难时,只需按一下鼠标就能彻底解决问题。A good disaster recovery solution, should allow modeling of recovery plans around the above complex application architectures and also have the ability to add customized steps to handle application mappings between various tiers hence providing a single-click sure shot solution in the event of a disaster leading to a lower RTO.

本文档分步介绍了如何为 Hyper-V 和 VMware vSphere 平台上的本地 Citrix XenApp 部署生成灾难恢复解决方案。This document provides step-by-step guidance for building a disaster recovery solution for your on-premises Citrix XenApp deployments on Hyper-V and VMware vSphere platforms. 此外还介绍了如何利用恢复计划、支持的配置和先决条件,执行到 Azure 的测试故障转移(灾难恢复演练)和计划外故障转移。This document also describes how to perform a test failover(disaster recovery drill) and unplanned failover to Azure using recovery plans, the supported configurations and prerequisites.

必备组件Prerequisites

在开始之前,请确保了解以下知识:Before you start, make sure you understand the following:

  1. 将虚拟机复制到 AzureReplicating a virtual machine to Azure
  2. 如何设计恢复网络How to design a recovery network
  3. 执行到 Azure 的测试故障转移Doing a test failover to Azure
  4. 执行到 Azure 的故障转移Doing a failover to Azure
  5. 如何复制域控制器How to replicate a domain controller
  6. 如何复制 SQL ServerHow to replicate SQL Server

部署模式Deployment patterns

Citrix XenApp 和 XenDesktop 场通常具有以下部署模式:A Citrix XenApp and XenDesktop farm typically have the following deployment pattern:

部署模式Deployment pattern

包含 AD DNS 服务器、SQL 数据库服务器、Citrix 传递控制器、StoreFront 服务器、XenApp Master (VDA) 和 Citrix XenApp 许可证服务器的 Citrix XenApp 和 XenDesktop 部署Citrix XenApp and XenDesktop deployment with AD DNS server, SQL database server, Citrix Delivery Controller, StoreFront server, XenApp Master (VDA), Citrix XenApp License Server

部署模式 1

Site Recovery 支持Site Recovery support

本文旨在使用由 vSphere 6.0/System Center VMM 2012 R2 管理的 VMware 虚拟机上的 Citrix 部署来设置 DR。For the purpose of this article, Citrix deployments on VMware virtual machines managed by vSphere 6.0 / System Center VMM 2012 R2 were used to setup DR.

源和目标Source and target

方案Scenario 到辅助站点To a secondary site 到 AzureTo Azure
Hyper-VHyper-V 不在范围内Not in scope Yes
VMwareVMware 不在范围内Not in scope Yes
物理服务器Physical server 不在范围内Not in scope Yes

版本Versions

客户可以部署 XenApp 组件,作为在 Hyper-V 或 VMware 上运行的虚拟机或作为物理服务器。Customers can deploy XenApp components as Virtual Machines running on Hyper-V or VMware or as Physical Servers. Azure Site Recovery 可以保护 Azure 中的物理部署与虚拟部署。Azure Site Recovery can protect both physical and virtual deployments to Azure. 由于 Azure 支持 XenApp 7.7 或更高版本,因此只能将包含这些版本的部署故障转移到 Azure,用于灾难恢复或迁移。Since XenApp 7.7 or later is supported in Azure, only deployments with these versions can be failed over to Azure for Disaster Recovery or migration.

要点Things to keep in mind

  1. 支持通过使用服务器 OS 计算机传递 XenApp 发布的应用和 XenApp 发布的桌面,来保护和恢复本地部署。Protection and recovery of on-premises deployments using Server OS machines to deliver XenApp published apps and XenApp published desktops is supported.

  2. 不支持通过使用桌面 OS 计算机传递客户端虚拟桌面(包括 Windows 10)的桌面 VDI 来保护和恢复本地部署。Protection and recovery of on-premises deployments using desktop OS machines to deliver Desktop VDI for client virtual desktops, including Windows 10, is not supported. 这是因为 Site Recovery 不支持恢复具有桌面 OS 的计算机。This is because Site Recovery does not support the recovery of machines with desktop OS’es. 此外,Azure 尚不支持对某些客户端虚拟桌面操作系统(如Also, some client virtual desktop operating systems (eg. Windows 7)授权。Windows 7) are not yet supported for licensing in Azure. 了解 Azure 中的客户端/服务器桌面授权。Learn More about licensing for client/server desktops in Azure.

  3. Azure Site Recovery 无法复制和保护现有的本地 MCS 或 PVS 克隆。Azure Site Recovery cannot replicate and protect existing on-premises MCS or PVS clones. 需要使用从传递控制器预配的 Azure RM 重新创建这些克隆。You need to recreate these clones using Azure RM provisioning from Delivery controller.

  4. 无法使用 Azure Site Recovery 保护 NetScaler,因为 NetScaler 基于 FreeBSD,而 Azure Site Recovery 不支持保护 FreeBSD OS。NetScaler cannot be protected using Azure Site Recovery as NetScaler is based on FreeBSD and Azure Site Recovery does not support protection of FreeBSD OS. 故障转移到 Azure 之后,你需要部署并配置来自 Azure 应用商店的新 NetScaler 设备。You would need to deploy and configure a new NetScaler appliance from Azure Market place after failover to Azure.

复制虚拟机Replicating virtual machines

需要保护 Citrix XenApp 部署的以下组件,才能启用复制和恢复。The following components of the Citrix XenApp deployment need to be protected to enable replication and recovery.

  • 保护 AD DNS 服务器Protection of AD DNS server
  • 保护 SQL 数据库服务器Protection of SQL database server
  • 保护 Citrix 传递控制器Protection of Citrix Delivery Controller
  • 保护 StoreFront 服务器。Protection of StoreFront server.
  • 保护 XenApp Master (VDA)Protection of XenApp Master (VDA)
  • 保护 Citrix XenApp 许可证服务器Protection of Citrix XenApp License Server

AD DNS 服务器复制AD DNS server replication

有关在 Azure 中复制和配置域控制器的指南,请参阅使用 Azure Site Recovery 保护 Active Directory 和 DNSPlease refer to Protect Active Directory and DNS with Azure Site Recovery on guidance for replicating and configuring a domain controller in Azure.

SQL 数据库服务器复制SQL database Server replication

有关用于保护 SQL 服务器的推荐选项的详细技术指南,请参阅使用 SQL Server 灾难恢复和 Azure Site Recovery 来保护 SQL ServerPlease refer to Protect SQL Server with SQL Server disaster recovery and Azure Site Recovery for detailed technical guidance on the recommended options for protecting SQL servers.

遵循此指南,开始将其他组件虚拟机复制到 Azure。Follow this guidance to start replicating the other component virtual machines to Azure.

保护 XenApp 组件

“计算和网络”设置Compute and Network Settings

计算机受保护后(“复制的项”下的状态显示为“受保护”),需要配置“计算和网络”设置。After the machines are protected (status shows as “Protected” under Replicated Items), the Compute and Network settings need to be configured. 在“计算和网络”>“计算属性”中,可以指定 Azure VM 名称和目标大小。In Compute and Network > Compute properties, you can specify the Azure VM name and target size. 根据需要修改名称,使其符合 Azure 要求。Modify the name to comply with Azure requirements if you need to. 还可以查看和添加目标网络、子网的相关信息,以及要分配到 Azure VM 的 IP 地址。You can also view and add information about the target network, subnet, and IP address that will be assigned to the Azure VM.

注意以下事项:Note the following:

  • 可以设置目标 IP 地址。You can set the target IP address. 如果未提供地址,故障转移的计算机将使用 DHCP。If you don't provide an address, the failed over machine will use DHCP. 如果设置了无法用于故障转移的地址,故障转移不会正常工作。If you set an address that isn't available at failover, the failover won't work. 如果地址可用于测试故障转移网络,则同一个目标 IP 地址可用于测试故障转移。The same target IP address can be used for test failover if the address is available in the test failover network.

  • 对于 AD/DNS 服务器,如果保留本地地址,则可以为 Azure 虚拟网络指定与 DNS 服务器相同的地址。For the AD/DNS server, retaining the on-premises address lets you specify the same address as the DNS server for the Azure Virtual network.

网络适配器数目根据你为目标虚拟机指定的大小来确定,如下所述:The number of network adapters is dictated by the size you specify for the target virtual machine, as follows:

  • 如果源计算机上的网络适配器数小于或等于目标计算机大小允许的适配器数,则目标的适配器数将与源相同。If the number of network adapters on the source machine is less than or equal to the number of adapters allowed for the target machine size, then the target will have the same number of adapters as the source.
  • 如果源虚拟机的适配器数大于目标大小允许的数目,则使用目标大小允许的最大数目。If the number of adapters for the source virtual machine exceeds the number allowed for the target size then the target size maximum will be used.
  • 例如,如果源计算机有两个网络适配器,而目标计算机大小支持四个,则目标计算机将有两个适配器。For example, if a source machine has two network adapters and the target machine size supports four, the target machine will have two adapters. 如果源计算机有两个适配器,但支持的目标大小只支持一个,则目标计算机只有一个适配器。If the source machine has two adapters but the supported target size only supports one then the target machine will have only one adapter.
  • 如果虚拟机有多个网络适配器,它们将全部连接到同一个网络。If the virtual machine has multiple network adapters they will all connect to the same network.
  • 如果虚拟机有多个网络适配器,列表中显示的第一个适配器将成为 Azure 虚拟机中的默认网络适配器。If the virtual machine has multiple network adapters, then the first one shown in the list becomes the Default network adapter in the Azure virtual machine.

创建恢复计划Creating a recovery plan

为 XenApp 组件 VM 启用复制后,下一步是创建恢复计划。After replication is enabled for the XenApp component VMs, the next step is to create a recovery plan. 恢复计划将故障转移和恢复要求相似的虚拟机集合在一起。A recovery plan groups together virtual machines with similar requirements for failover and recovery.

创建恢复计划的步骤Steps to create a recovery plan

  1. 在恢复计划中添加 XenApp 组件虚拟机。Add the XenApp component virtual machines in the Recovery Plan.
  2. 单击“恢复计划”->“+ 恢复计划”。Click Recovery Plans -> + Recovery Plan. 为恢复计划提供一个直观的名称。Provide an intuitive name for the recovery plan.
  3. 对于 VMware 虚拟机:选择 VMware 进程服务器作为源,选择 Microsoft Azure 作为目标,选择“资源管理器”作为部署模型,然后单击“选择项”。For VMware virtual machines: Select source as VMware process server, target as Microsoft Azure, and deployment model as Resource Manager and click on Select items.
  4. 对于 Hyper-V 虚拟机:选择 VMM 服务器作为源,选择 Microsoft Azure 作为目标,选择“资源管理器”作为部署模型,单击“选择项”,然后选择 XenApp 部署 VM。For Hyper-V virtual machines: Select source as VMM server, target as Microsoft Azure, and deployment model as Resource Manager and click on Select items and then select the XenApp deployment VMs.

将虚拟机添加到故障转移组Adding virtual machines to failover groups

可以自定义恢复计划,以便按特定启动顺序添加故障转移组、添加脚本或手动操作。Recovery plans can be customized to add failover groups for specific startup order, scripts or manual actions. 需要向恢复计划添加以下组。The following groups need to be added to the recovery plan.

  1. 故障转移组 1:AD DNSFailover Group1: AD DNS
  2. 故障转移组 2:SQL Server VMFailover Group2: SQL Server VMs
  3. 故障转移组 3:VDA 主映像 VMFailover Group3: VDA Master Image VM
  4. 故障转移组 4:传递控制器和 StoreFront 服务器 VMFailover Group4: Delivery Controller and StoreFront server VMs

将脚本添加到恢复计划Adding scripts to the recovery plan

脚本可以在恢复计划中的特定组之前或之后运行。Scripts can be run before or after a specific group in a recovery plan. 在故障转移期间,还可以添加和执行手动操作。Manual actions can also be included and performed during failover.

自定义的恢复计划如下所示:The customized recovery plan looks like the below:

  1. 故障转移组 1:AD DNSFailover Group1: AD DNS

  2. 故障转移组 2:SQL Server VMFailover Group2: SQL Server VMs

  3. 故障转移组 3:VDA 主映像 VMFailover Group3: VDA Master Image VM

    备注

    包含手动操作或脚本操作的步骤 4、6 和 7 仅适用于具有 MCS/PVS 目录的本地 XenApp 环境。Steps 4, 6 and 7 containing manual or script actions are applicable to only an on-premises XenApp >environment with MCS/PVS catalogs.

  4. 组 3 手动或脚本操作:关闭主 VDA VM。Group 3 Manual or script action: Shut down master VDA VM. 主 VDA VM 在故障转移到 Azure 时将处于运行状态。The Master VDA VM when failed over to Azure will be in a running state. 若要使用 Azure 宿主创建新的 MCS 目录,Master VDA VM 需处于“已停止”(已解除分配)状态。To create new MCS catalogs using Azure hosting, the master VDA VM is required to be in Stopped (de allocated) state. 从 Azure 门户关闭 VM。Shutdown the VM from Azure portal.

  5. 故障转移组 4:传递控制器和 StoreFront 服务器 VMFailover Group4: Delivery Controller and StoreFront server VMs

  6. 组3 手动操作或脚本操作 1:Group3 manual or script action 1:

    添加 Azure RM 主机连接Add Azure RM host connection

    在交付控制器计算机中创建 Azure 主机连接,以便在 Azure 中预配新的 MCS 目录。Create Azure host connection in Delivery Controller machine to provision new MCS catalogs in Azure. 按此所述的步骤进行操作。Follow the steps as explained in this article.

  7. 组3 手动操作或脚本操作 2:Group3 manual or script action 2:

    在 Azure 中重新创建 MCS 目录Re-create MCS Catalogs in Azure

    主站点上现有的 MCS 或 PVS 克隆不会复制到 Azure。The existing MCS or PVS clones on the primary site will not be replicated to Azure. 你需要使用从交付控制器复制的主 VDA 和 Azure 预配重新创建这些克隆。You need to recreate these clones using the replicated master VDA and Azure provisioning from Delivery controller. 根据此文章中介绍的步骤在 Azure 中创建 MCS 目录。Follow the steps as explained in this article to create MCS catalogs in Azure.

XenApp 组件的恢复计划

备注

可以使用此处的脚本,根据需要使用已故障转移虚拟机的新 IP 更新 DNS 或在已故障转移虚拟机上附加负载均衡器。You can use scripts at location to update the DNS with the new IPs of the failed over >virtual machines or to attach a load balancer on the failed over virtual machine, if needed.

执行测试故障转移Doing a test failover

遵循此指南执行测试故障转移。Follow this guidance to do a test failover.

恢复计划

执行故障转移Doing a failover

执行故障转移时,请遵循此指南Follow this guidance when you are doing a failover.

后续步骤Next steps

可以从本白皮书中详细了解如何复制 Citrix XenApp 和 XenDesktop 部署。You can learn more about replicating Citrix XenApp and XenDesktop deployments in this white paper. 请查看相关指南,使用 Site Recovery 复制其他应用程序Look at the guidance to replicate other applications using Site Recovery.