重新引导 vCenter Server 后 ESXi 主机中存在重复的 VTEP
search cancel

重新引导 vCenter Server 后 ESXi 主机中存在重复的 VTEP

book

Article ID: 339080

calendar_today

Updated On:

Products

VMware NSX Networking

Issue/Introduction

移除重新引导 vCenter Server 6.0 后 VXLAN 准备就绪的 ESXi 主机中出现的重复 VTEP。

Symptoms:

免责声明:本文为 Duplicate VTEPs in ESXi hosts after rebooting vCenter Server (2144605) 的翻译版本。尽管我们会不断努力为本文提供最佳翻译版本,但本地化的内容可能会过时。有关最新内容,请参见英文版本。



重新引导 vCenter Server 6.0 后,VXLAN 准备就绪的 ESXi 主机中配置了重复的虚拟隧道终结点 (VTEP)。

注意:有关其他症状和日志条目,请参见“Additional Information”部分。

Environment

VMware NSX for vSphere 6.2.x
VMware NSX for vSphere 6.1.x

Cause

初始化服务重新启动或计算机重新引导操作时,vCenter Server 6.0 可能要花很长时间查询 ESXi 主机配置。由于存在这段时间延迟,NSX Manager 收到的更新信息中会说明主机配置为空。

这时,NSX Manager 会从数据库中移除与 ESXi 主机关联的 VTEP 信息,相应的 IP 地址也可供重新使用。随后,NSX Manager 会通过在受影响的 ESXi 主机上创建新的 VTEP 来尝试更正此问题,并可能重复使用之前的 IP 地址。此时,ESXi 主机将具有比预期更多的 VTEP,而且环境中可能存在具有重复 IP 地址的 VTEP。

Resolution

此问题在 VMware NSX for vSphere 6.2 4(可从 VMware Downloads 获取)中已解决。

要在不升级的情况下临时解决此问题,请移除重复的 VTEP:

移除重复的 VTEP:

  1. 将受影响的 ESXi 主机置于维护模式。
  2. 从 ESXi 主机删除原始 VTEP,以便使 ESXi 配置与 NSX Manager 配置保持一致。
  3. 在 vSphere Client 中,选择 ESXi 主机,然后单击配置>网络>vSphereDistributed Switch
  4. 选择管理 VXLAN vDS 的虚拟适配器,然后移除 vmkernel 接口。
  5. 退出维护模式。
  6. 为所有受影响的 ESXi 主机重复步骤 1 至 3。
  7. 单击网络和安全>安装>主机准备,从 UI 启动强制同步 VXLAN。
  8. 在已修复的 ESXi 主机上确认网络和虚拟机。

要防止出现此情况,请执行以下操作:

使用所附脚本监控并了解重新启动 vCenter Server 后何时启动 NSX Manager 是安全的。

  1. 下载此知识库文章附带的 2144605_checkESXconfig.zip 文件。
  2. 使用 SCP 将 2144605_checkESXconfig.py 脚本复制到 ESXi 主机或 VCSA,并运行此脚本:

    # python2144605_checkESXconfig.py--servervCenter_server--userusername--passwordpassword

    注意
    • 此脚本会连接到 vCenter Server,并查询 vCenter 环境中所有 ESXi Server 的配置。
    • 默认安全策略会阻止 443 上的出站连接。如果脚本失败,请在安全配置文件下修改防火墙以启用 httpClient,从而允许在端口 443 上进行出站连接。

    如果 ESXi 主机配置值不为空,您会看到以下输出:

    #python checkESXconfig.py --server myvcenter.corp.local --user [email protected] --password mycorppassword123
    API thread output:
    Hosts with NULL config : {}
    Hosts with NULL config.network : {}
    PC thread output:
    Hosts with NULL config : {}
    Hosts with NULL config.network : {}
    vCenter initialisation has completed, it is now ok to start the NSX Manager service.

    如果 ESXi 主机具有空配置值,您会看到以下输出:

    # python checkESXconfig.py --server myvcenter.corp.local --user [email protected] --password mycorppassword123
    API thread output:
    Hosts with NULL config : {}
    Hosts with NULL config.network : {'vim.HostSystem:host-27': 1, 'vim.HostSystem:host-481': 1, 'vim.HostSystem:host-10': 1}
    PC thread output:
    Hosts with NULL config : {}
    Hosts with NULL config.network : {'vim.HostSystem:host-27': 1, 'vim.HostSystem:host-481': 1, 'vim.HostSystem:host-10'
    Waiting for 10 seconds
    Writing Hosts with NULL config to file ConfigIssueHosts.txt
    vCenter is still initialising, do not start the NSX Manager Service.Please check the output files generated for affected hosts and apply the workaround.

    注意
    • 在本例中,有三台 ESXi 主机(host-27、host-481 和 host-10)含有空值。
    • ConfigIssueHosts.txt输出文件含有这些 ESXi 主机的 DNS 名称。
  3. 如果在输出中并未发现含有空值的主机,请启动 NSX Manager 服务。

    如果在输出中发现含有空值的主机:

    与 ESXi 主机建立 SSH 会话,然后通过运行以下命令,重新启动 hostd 和 vpxa 管理服务:

    /etc/init.d/hostd restart
    /etc/init.d/vpxa restart


    注意:这可能会导致 ESXi 主机与 vCenter Server 短暂断开连接,但正在运行的虚拟机不会受影响。

注意:如果在 ESXi 主机处于“已断开连接”或“无响应”状态时重新引导 vCenter Server 6.0,ESXi 主机会报告空配置,这是预期行为。VMware 建议在重新引导前确保所有 ESXi 主机都已连接且在 vCenter Server 中都有响应。


Additional Information

您还会遇到以下症状:

在 NSX Manager 控制台上运行show log命令时,您会看到类似以下内容的条目:
  • 在 NSX for vSphere 6.2.x 中

    INFO DCNPool-4 VdnHostInstallationServiceImpl:691 - Host host-75 has 0 vmknics

    INFO DCNPool-4 VdnHostInstallationServiceImpl:699 - vmknic vmk2 does not appear in the host host-75, remove it from database

    INFO TaskFrameworkExecutor-28 VdnHostInstallationServiceImpl:359 - Host host-75 found (new or vmknic missing).Initializing preparation

    INFO TaskFrameworkExecutor-6 PrepareVdsHostTask:212 - Creating vmknic on host host-75 pg dvportgroup-179 ipaddress xxx.xxx.xxx.xxx

  • 在 NSX for vSphere 6.1.x 及更高版本中:

    ERROR ViInventoryThread ViManagedHostSystemObject:358 - no hostNetInfo

注意:此问题不会出现在 vCenter Server 5.5 环境中,因为 vCenter Server 5.5 在数据库中缓存主机配置。

在极少数情况下,vCenter Server 可能会以不受控的方式重新启动。例如,在出现 vCenter Server 计算机崩溃、磁盘空间不足等情况时,它可能无法在 vCenter Server 服务重新启动之前停止 NSX Manager 服务。如果这种情况令人担忧,可以将 vCenter Server 服务及其从属服务设置为不随操作系统引导而自动启动。

可以在 Windows 中的服务下或使用 vCSA 上的 chkconfig 进行配置。

禁用 vCenter Server 服务的自动启动:
  • chkconfig -s vmware-eam off --level 0123456
  • chkconfig -s vmware-perfcharts off --level 0123456
  • chkconfig -s vmware-sps off --level 0123456
  • chkconfig -s vmware-vdcs off --level 0123456
  • chkconfig -s vmware-vpx-workflow off --level 0123456
  • chkconfig -s vmware-vsm off --level 0123456
  • chkconfig -s vsphere-client off --level 0123456
  • chkconfig -s vmware-vsan-health off --level 0123456
  • chkconfig -s vmware-vpxd off --level 0123456
重新引导后手动启动服务:
  • service-control --start vmware-vpxd
  • service-control --start vmware-eam
  • service-control --start vmware-perfcharts
  • service-control --start vmware-sps
  • service-control --start vmware-vdcs
  • service-control --start vmware-vpx-workflow
  • service-control --start vmware-vsm
  • service-control --start vsphere-client
  • service-control --start vmware-vsan-health
重新启用 vCenter 服务的自动启动:
  • chkconfig -s vmware-vpxd on --level 35
  • chkconfig -s vmware-eam on --level 35
  • chkconfig -s vmware-perfcharts on --level 35
  • chkconfig -s vmware-sps on --level 35
  • chkconfig -s vmware-vdcs on --level 35
  • chkconfig -s vmware-vpx-workflow on --level 35
  • chkconfig -s vmware-vsm on --level 35
  • chkconfig -s vsphere-client on --level 35
  • chkconfig -s vmware-vsan-health on --level 35
Duplicate VTEPs in ESXi hosts after rebooting vCenter Server

Attachments

2144605_checkESXconfig.zip get_app