解决将 VMware VM 或物理计算机故障转移到 Azure 时出现的错误Troubleshoot errors when failing over VMware VM or physical machine to Azure

在执行从虚拟机到 Azure 的故障转移时,可能会收到以下错误之一。You may receive one of the following errors while doing failover of a virtual machine to Azure. 若要解决错误,请为每个错误条件使用所述步骤。To troubleshoot, use the described steps for each error condition.

故障转移失败,错误 ID 为 28031Failover failed with Error ID 28031

Site Recovery 无法在 Azure 中创建故障转移的虚拟机。Site Recovery was not able to create a failed over virtual machine in Azure. 以下其中一个原因也可能导致此情况的发生:It could happen because of one of the following reasons:

  • 没有足够的可用配额来创建虚拟机:可以通过转到“订阅” -> “使用情况 + 配额”来检查可用配额。There isn't sufficient quota available to create the virtual machine: You can check the available quota by going to Subscription -> Usage + quotas. 可以打开 新的支持请求 来增加此配额。You can open a new support request to increase the quota.

  • 尝试在同一个可用性集中故障转移不同大小系列的虚拟机。You are trying to failover virtual machines of different size families in same availability set. 确保在同一个可用性集中选择相同大小系列的所有虚拟机。Ensure that you choose same size family for all virtual machines in the same availability set. 可以转到虚拟机的“计算和网络”设置来更改大小,然后重试故障转移。Change size by going to Compute and Network settings of the virtual machine and then retry failover.

  • 订阅上有一个阻止创建虚拟机的策略。There is a policy on the subscription that prevents creation of a virtual machine. 请更改此策略以允许创建虚拟机,然后重试故障转移。Change the policy to allow creation of a virtual machine and then retry failover.

故障转移失败,错误 ID 为 28092Failover failed with Error ID 28092

Site Recovery 无法为故障转移的虚拟机创建网络接口。Site Recovery was not able to create a network interface for the failed over virtual machine. 请确保订阅中有足够的配额来创建网络接口。Make sure you have sufficient quota available to create network interfaces in the subscription. 可以通过转到“订阅” -> “使用情况 + 配额”来检查可用配额。You can check the available quota by going to Subscription -> Usage + quotas. 可以打开 新的支持请求 来增加此配额。You can open a new support request to increase the quota. 如果你拥有足够的配额,则这可能是一个间歇性的问题,请重试该操作。If you have sufficient quota, then this might be an intermittent issue, try the operation again. 如果即使在重试后问题仍然存在,请在本文档结尾处留下注释。If the issue persists even after retries, then leave a comment at the end of this document.

故障转移失败,错误 ID 为 70038Failover failed with Error ID 70038

Site Recovery 无法在 Azure 中创建故障转移的经典虚拟机。Site Recovery was not able to create a failed over Classic virtual machine in Azure. 这可能是因为:It could happen because:

  • 创建虚拟机所需的其中一个资源(如虚拟网络)不存在。One of the resources such as a virtual network that is required for the virtual machine to be created doesn't exist. 在虚拟机的“计算和网络”设置下创建虚拟网络,或者将设置修改为已经存在的虚拟网络,然后重试故障转移。Create the virtual network as provided under Compute and Network settings of the virtual machine or modify the setting to a virtual network that already exists and then retry failover.

故障转移失败,错误 ID 为 170010Failover failed with Error ID 170010

Site Recovery 无法在 Azure 中创建故障转移的虚拟机。Site Recovery was not able to create a failed over virtual machine in Azure. 发生此情况可能是因为本地虚拟机上执行的混合的一个内部活动失败。It could happen because an internal activity of hydration failed for the on-premises virtual machine.

若要启动 Azure 中的任何计算机,Azure 环境需要某些驱动程序处于引导启动状态,并要求 DHCP 之类的服务处于自动启动状态。To bring up any machine in Azure, the Azure environment requires some of the drivers to be in boot start state and services like DHCP to be in autostart state. 因此,在进行故障转移时,混合活动会将 atapi、intelide、storflt、vmbus 和 storvsc 驱动程序 的启动类型转换为引导启动。Thus, hydration activity, at the time of failover, converts the startup type of atapi, intelide, storflt, vmbus, and storvsc drivers to boot start. 它还会将 DHCP 之类的一些服务的启动类型转换为自动启动。It also converts the startup type of a few services like DHCP to autostart. 此活动可能会由于环境特定问题而失败。This activity can fail due to environment specific issues.

若要手动更改 Windows 来宾 OS 的驱动程序的启动类型,请执行以下步骤:To manually change the startup type of drivers for Windows Guest OS, follow the below steps:

  1. 下载“非混合”脚本并如下所述运行脚本。Download the no-hydration script and run it as follows. 此脚本检查 VM 是否需要混合。This script checks if VM requires hydration.

    .\Script-no-hydration.ps1

    如果需要混合,则它提供以下结果:It gives the following result if hydration is required:

    REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\storvsc           start =  3 expected value =  0
    
    This system doesn't meet no-hydration requirement.
    

    如果 VM 满足“非混合”要求,则脚本将提供结果“此系统满足‘非混合’要求”。In case the VM meets no-hydration requirement, the script will give the result "This system meets no-hydration requirement". 在此情况下,所有驱动程序和服务都处于 Azure 所需的状态并且不需要在 VM 上进行混合。In this case, all drivers and services are in the state as required by Azure and hydration on the VM is not required.

  2. 如果 VM 不满足“非混合”要求,请如下所述运行“非混合”脚本。Run the no-hydration-set script as follows if the VM does not meet no-hydration requirement.

    .\Script-no-hydration.ps1 -set

    这将转换驱动程序的启动类型并提供如下所示的结果:This will convert the startup type of drivers and will give the result like below:

    REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\storvsc           start =  3 expected value =  0
    
    Updating registry:  REGISTRY::HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\storvsc   start =  0
    
    This system is now no-hydration compatible.
    

由于虚拟机上的“连接”按钮已灰显,无法连接/通过 RDP/SSH 连接到已故障转移的虚拟机Unable to connect/RDP/SSH to the failed over virtual machine due to grayed out Connect button on the virtual machine

有关 RDP 问题的详细故障排除说明,请参阅此处的文档。For detailed troubleshooting instructions on RDP issues, please see our documentation here.

有关 SSH 问题的详细故障排除说明,请参阅此处的文档。For detailed troubleshooting instructions on SSH issues, please see our documentation here.

如果 Azure 中已故障转移的 VM 的“连接”按钮灰显,并且你未通过快速路由或站点到站点 VPN 连接来连接到 Azure,则执行以下操作:If the Connect button on the failed over VM in Azure is grayed out and you are not connected to Azure via an Express Route or Site-to-Site VPN connection, then,

  1. 转到“虚拟机” > “网络”,单击所需网络接口的名称。Go to Virtual machine > Networking, click on the name of required network interface. 屏幕截图显示已选择网络接口名称的虚拟机的“网络”页面。
  2. 导航到“IP 配置”,然后单击所需 IP 配置的名称字段。Navigate to Ip Configurations, then click on the name field of required IP configuration. 屏幕截图显示已选择 IP 配置名称的网络接口的“IP 配置”页面。
  3. 若要启用公共 IP 地址,请单击“启用”。To enable Public IP address, click on Enable. 启用 IP
  4. 单击“配置所需设置” > “新建”。Click on Configure required settings > Create new. 新建
  5. 输入公共地址的名称,选择“SKU”和“分配”的默认选项,然后单击“确定”。Enter the name of public address, choose the default options for SKU and assignment, then click OK.
  6. 现在,单击“保存”以保存所做的更改。Now, to save the changes made, click Save.
  7. 关闭面板并导航到虚拟机的“概述”部分以进行连接/通过 RDP 连接。Close the panels and navigate to Overview section of virtual machine to connect/RDP.

无法连接/RDP/SSH - VM 的“连接”按钮可用Unable to connect/RDP/SSH - VM Connect button available

如果 Azure 中已故障转移的 VM 的“连接”按钮可用(未灰显),则请检查虚拟机上的“启动诊断”,查看是否有此文中所列的错误。 If the Connect button on the failed over VM in Azure is available (not grayed out), then check Boot diagnostics on your Virtual Machine and check for errors as listed in this article.

  1. 如果虚拟机尚未启动,请尝试故障转移到以前的恢复点。If the virtual machine has not started, try failing over to an older recovery point.

  2. 如果虚拟机中的应用程序未启动,请尝试故障转移到应用一致的恢复点。If the application inside the virtual machine is not up, try failing over to an app-consistent recovery point.

  3. 如果虚拟机已加入域,请确保域控制器正确运行。If the virtual machine is domain joined, then ensure that domain controller is functioning accurately. 可以按照下面给出的步骤执行此操作:This can be done by following the below given steps:

    a.a. 在同一网络中创建新的虚拟机。Create a new virtual machine in the same network.

    b.b. 确保能够加入其中应启动故障转移的虚拟机的同一域。Ensure that it is able to join to the same domain on which the failed over virtual machine is expected to come up.

    c.c. 如果域控制器 正确运行,请尝试使用本地管理员帐户登录到故障转移的虚拟机。If the domain controller is not functioning accurately, then try logging into the failed over virtual machine using a local administrator account.

  4. 如果使用自定义 DNS 服务器,请确保可以访问该服务器。If you are using a custom DNS server, then ensure that it is reachable. 可以按照下面给出的步骤执行此操作:This can be done by following the below given steps:

    a.a. 在同一网络中创建新的虚拟机;Create a new virtual machine in the same network and

    b.b. 检查虚拟机是否能够使用自定义 DNS 服务器解析名称Check if the virtual machine is able to do name resolution using the custom DNS Server

备注

启用除“启动诊断”以外的任何设置,都需要在故障转移之前在虚拟机中安装 Azure VM 代理Enabling any setting other than Boot Diagnostics would require Azure VM Agent to be installed in the virtual machine before the failover

将基于 UEFI 的计算机故障转移到 Azure 后无法打开串行控制台Unable to open serial console after failover of a UEFI based machine into Azure

如果可以使用 RDP 连接到计算机,但无法打开串行控制台,请执行以下步骤:If you are able to connect to the machine using RDP but cannot open serial console, follow the below steps:

  • 如果计算机操作系统是 Red Hat 或 Oracle Linux 7.*/8.0,请在具有根权限的故障转移 Azure 虚拟机上运行以下命令。If the machine OS is Red Hat or Oracle Linux 7.*/8.0, run the following command on the failover Azure VM with root permissions. 在执行命令后重启 VM。Reboot the VM after the command.

    grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
    
  • 如果计算机操作系统是 CentOS 7.*,请在具有根权限的故障转移 Azure 虚拟机上运行以下命令。If the machine OS is CentOS 7.*, run the following command on the failover Azure VM with root permissions. 在执行命令后重启 VM。Reboot the VM after the command.

    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
    

意外关闭消息(事件 ID 6008)Unexpected shutdown message (Event ID 6008)

在故障转移后启动 Windows VM 时,如果在恢复的 VM 上收到一条有关意外关闭的消息,则表明在用于故障转移的恢复点中未捕获 VM 关闭状态。When booting up a Windows VM post failover, if you receive an unexpected shutdown message on the recovered VM, it indicates that a VM shutdown state was not captured in the recovery point used for failover. 如果恢复到某个点,在这个点 VM 尚未完全关闭,则会发生这种情况。This happens when you recover to a point when the VM had not been fully shut down.

对于计划外故障转移,这通常不需要担心,通常可以忽略。This is normally not a cause for concern and can usually be ignored for unplanned failovers. 如果已计划故障转移,请确保在故障转移之前 VM 正常关闭,并提供足够的时间让待发送的本地复制数据发送到 Azure。If the failover is planned, ensure that the VM is properly shut down prior to failover and provide sufficient time for pending replication data on-premises to be sent to Azure. 然后使用“故障转移”屏幕上的“最新”选项,将 Azure 上的任何待处理数据处理到一个恢复点中,随后用于 VM 故障转移。Then use the Latest option on the Failover screen so that any pending data on Azure is processed into a recovery point, which is then used for VM failover.

无法选择数据存储Unable to select the Datastore

尝试重新保护发生了故障转移的虚拟机时,如果无法在 Azure 门户中看到数据存储,则表示出现了此问题。This issue is indicated when you are unable to see the datastore in Azure the portal when trying to reprotect the virtual machine that has experienced a failover. 这是因为无法将主目标识别为添加到 Azure Site Recovery 的 vCenter 下的虚拟机。This is because the Master target is not recognized as a virtual machine under vCenters added to Azure Site Recovery.

有关重新保护虚拟机的详细信息,请参阅故障转移到 Azure 后,将计算机重新保护并故障回复到本地站点For more information about reprotecting a virtual machine, see Reprotect and fail back machines to an on-premises site after failover to Azure.

若要解决问题,请执行以下操作:To resolve the issue:

在 vCenter 中手动创建管理源计算机的主目标。Manually create the Master target in the vCenter that manages your source machine. 数据存储将在执行后续 vCenter 发现和刷新结构操作后可用。The datastore will be available after the next vCenter discovery and refresh fabric operations.

备注

发现和刷新结构操作可能需要最多 30 分钟才能完成。The discovery and refresh fabric operations can take up to 30 minutes to complete.

在 CS 上注册 Linux 主目标失败,出现 TLS 错误 35Linux Master Target registration with CS fails with a TLS error 35

由于在主目标上启用了“经过身份验证的代理”,因此在配置服务器上注册 Azure Site Recovery 主目标失败。The Azure Site Recovery Master Target registration with the configuration server fails due to the Authenticated Proxy being enabled on the Master Target.

安装日志中的以下字符串指示了此错误:This error is indicated by the following strings in the installation log:

RegisterHostStaticInfo encountered exception config/talwrapper.cpp(107)[post] CurlWrapper Post failed : server : 10.38.229.221, port : 443, phpUrl : request_handler.php, secure : true, ignoreCurlPartialError : false with error: [at curlwrapperlib/curlwrapper.cpp:processCurlResponse:231]   failed to post request: (35) - SSL connect error. 

若要解决问题,请执行以下操作:To resolve the issue:

  1. 在配置服务器 VM 上,打开命令提示符并使用以下命令验证代理设置:On the configuration server VM, open a command prompt and verify the proxy settings using the following commands:

    cat /etc/environment echo $http_proxy echo $https_proxycat /etc/environment echo $http_proxy echo $https_proxy

  2. 如果前面命令的输出显示已定义 http_proxy 或 https_proxy 设置,请使用以下方法之一取消阻止主目标与配置服务器之间的通信:If the output of the previous commands shows that either the http_proxy or https_proxy settings are defined, use one of the following methods to unblock the Master Target communications with configuration server:

    • 下载 PsExec 工具Download the PsExec tool.

    • 使用该工具访问系统用户上下文并确定是否配置了代理地址。Use the tool to access the System user context and determine whether the proxy address is configured.

    • 如果已配置代理,请使用 PsExec 工具在系统用户上下文中打开 IE。If the proxy is configured, open IE in a system user context using the PsExec tool.

      psexec -s -i "%programfiles%\Internet Explorer\iexplore.exe"psexec -s -i "%programfiles%\Internet Explorer\iexplore.exe"

    • 若要确保主目标服务器可以与配置服务器通信,请执行以下操作:To ensure that the master target server can communicate with the configuration server:

      • 将 Internet Explorer 中的代理设置修改为通过代理绕过主目标服务器 IP 地址。Modify the proxy settings in Internet Explorer to bypass the Master Target server IP address through the proxy.
        Or
      • 禁用主目标服务器上的代理。Disable the proxy on Master Target server.

后续步骤Next steps

如需更多帮助,请在有关 Site Recovery 的 Microsoft Q&A 问题页面上发布查询。If you need more help, then post your query on Microsoft Q&A question page for Site Recovery . 我们的活动社区应能够为你提供帮助。We have an active community that should be able to assist you.