Synchronizing ESXi/ESX time with a Microsoft Domai

Workaround

If you are using ESXi/ESX 4.1 Update 1 or later, you can use this workaround:

When using Active Directory integration in ESXi/ESX 4.1 and newer, it is important to synchronize time between ESXi/ESX and the directory service to facilitate the Kerberos security protocol.

ESXi/ESX support synchronization of time with an external NTPv3 or NTPv4 server compliant with RFC 5905 and RFC 1305. Microsoft Windows 2003 and newer use the W32Time service to synchronize time for windows clients and facilitate the Kerberos v5 protocol. For more information, see the Microsoft Knowledge Base article 939322 and How the Windows Time Service Works.

By default, an unsynced Windows server chooses a 10-second dispersion and adds to the dispersion on each poll interval that it remains in sync. An ESXi/ESX host, by default, does not accept any NTP reply with a root dispersion greater than 1.5 seconds.

The preceding links were correct as of April 16, 2013. If you find a link is broken, provide feedback and a VMware employee will update the link.

Configure Windows NTP Client

ESXi/ESX requires an accurate time source to synchronize with. To use a Windows 2003 or newer server, it should be configured to get its time from an accurate upstream NTP server. For more information, see the Microsoft Knowledge Base article 816042.

The preceding link was correct as of April 16, 2013. If you find a link is broken, provide feedback and a VMware employee will update the link.

Use the registry editor on the Windows server to make the configuration changes:

Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article 136393.

  1. Enable NTP mode:


    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

    2. Set the Type value to NTP.

  2. Enable the NTP Client:


    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

    2. Set the AnnounceFlags value to 5.

  3. Specify the upstream NTP servers to sync from:


    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders

    2. Set the NtpServer value to a list of at least 3 NTP servers.

      Example: You might set the value to:

      1.pool.ntp.org,0x1 2.pool.ntp.org,0x1 3.pool.ntp.org,0x1

      Note: On a Windows 2008 Domain Controller, NtpServer is located inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters.

  4. Specify a 15-minute update interval:


    1. Locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

    2. Set the SpecialPollInterval value to 900.

  5. Restart the W32time service for the changes to take effect.


Configure ESXi/ESX NTP and Likewise Clients

Configure ESXi/ESX to synchronize time with the Windows server Active Directory Domain Controller:

  1. Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.

  2. Click the ESXi/ESX host in the inventory.

  3. Click the Configuration tab.

  4. Under the Software heading, click Time Configuration.

  5. Click Properties.

  6. Ensure that the NTP Client Enabled option is selected.

  7. Click Options.

  8. Click NTP Settings.

  9. Click Add and specify the fully qualified domain name or IP address of the Windows server Domain Controller(s).

  10. Click OK.

  11. Click OK to save the changes.


Additional configuration must be done from the command line.

  1. Open a console to the ESXi/ESX host. For more information, see Connecting to an ESX host using a SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).

  2. Open the /etc/ntp.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).

  3. Add the tos maxdist command on its own line:

    tos maxdist 30

  4. Save and close the configuration file.

  5. Make the /etc/likewise/lsassd.conf file writable by running the command:

    chmod +w /etc/likewise/lsassd.conf

  6. Open the /etc/likewise/lsassd.conf file in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).

  7. Locate the sync-system-time option, uncomment it, and set the value to no:

    sync-system-time = no

  8. Save and close the configuration file.

  9. On ESXi, save the configuration changes to the boot bank so they persist across reboots by running the command:

    /sbin/auto-backup.sh

  10. Restart the ntpd and lsassd services for the configuration changes to take effect by running the commands:

    service lsassd restart
    service ntpd restart


    Note: To restart the ntpd and lsassd services on an ESXi host, run these commands:

    /etc/init.d/lsassd restart
    /etc/init.d/ntpd restart


If the ntpd and lsassd services do not restart, consider restarting the management agents first. For more information about restarting the management agents, see Restarting the Management agents on an ESX or ESXi Server (1003490).

Once the configuration changes are complete, ensure that the time is synchronized between the ESXi/ESX host and the Windows server. For more information, see Troubleshooting NTP on ESX and ESXi (1005092).

转载于:https://my.oschina.net/u/437851/blog/354542

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值