配置 Azure Stack Hub 的时间服务器Configure the time server for Azure Stack Hub

可以使用特权终结点 (PEP) 来更新 Azure Stack Hub 中的时间服务器。You can use the privileged endpoint (PEP) to update the time server in Azure Stack Hub. 使用可解析为两个或更多个 NTP(网络时间协议)服务器 IP 地址的主机名。Use a host name that resolves to two or more NTP (Network Time Protocol) server IP addresses.

Azure Stack Hub 使用 NTP 连接到 Internet 上的时间服务器。Azure Stack Hub uses NTP to connect to time servers on the internet. NTP 服务器提供准确的系统时间。NTP servers provide accurate system time. Azure Stack Hub 的物理网络交换机、硬件生命周期主机、基础结构服务和虚拟机都使用时间。Time is used across Azure Stack Hub's physical network switches, hardware lifecycle host, infrastructure service, and virtual machines. 如果时钟未同步,Azure Stack Hub 可能会遇到严重的网络和身份验证问题。If the clock isn't synchronized, Azure Stack Hub may experience severe issues with the network and authentication. 在创建日志文件、文档和其他文件时,时间戳可能会不正确。Log files, documents, and other files may be created with incorrect timestamps.

必须提供一个时间服务器 (NTP),这样 Azure Stack Hub 才能同步时间。Providing one time server (NTP) is required for Azure Stack Hub to synchronize time. 部署 Azure Stack Hub 时,请提供 NTP 服务器的地址。When you deploy Azure Stack Hub, you provide the address of an NTP server. 时间是重要的数据中心基础结构服务。Time is a critical datacenter infrastructure service. 如果服务更改,则需更新时间。If the service changes, you need to update the time.

备注

Azure Stack Hub 支持只与一个时间服务器 (NTP) 同步时间。Azure Stack Hub supports synchronizing time with only one time server (NTP). 不能提供多个 NTP 供 Azure Stack Hub 与其同步时间。You can't provide multiple NTPs for Azure Stack Hub to synchronize time with.

配置时间Configure time

  1. 连接到 PEPConnect to the PEP.

    备注

    不需开具支持票证来解锁特权终结点。It isn't necessary to unlock the privileged endpoint by opening a support ticket.

  2. 运行以下命令即可查看当前的已配置 NTP 服务器:Run the following command to review the current configured NTP server:

    Get-AzsTimeSource
    
  3. 运行以下命令即可更新 Azure Stack Hub,以便使用新的 NTP 服务器并立即同步时间。Run the following command to update Azure Stack Hub to use the new NTP server and to immediately synchronize the time.

    备注

    此过程不会更新物理交换机上的时间服务器。This procedure doesn't update the time server on the physical switches. 如果时间服务器不是基于 Windows 的 NTP 服务器,则需添加 0x8 标志。If your time server isn't a Windows-based NTP server, you need to add the flag 0x8.

    Set-AzsTimeSource -TimeServer NEWTIMESERVERIP -resync
    

    对于基于 Windows 的时间服务器以外的服务器:For servers other than Windows-based time servers:

    Set-AzsTimeSource -TimeServer "NEWTIMESERVERIP,0x8" -resync
    
  4. 请查看命令输出中是否有错误。Review the output of the command for any errors.

后续步骤Next steps

查看就绪性报表View the readiness report
有关 Azure Stack Hub 集成的一般注意事项General Azure Stack Hub integration considerations