Activer007 发表于 2013-1-2 10:27:08

设置NTP的问题,在那里看同步错误信息?

本帖最后由 Activer007 于 2-1-2013 21:45 编辑
我是在一台Windows 2003的服务器上设置了NTP服务,用Windows客户端 连接该服务器 能成功更新时间,
用XP客户端可以,用Windows7客户端也可以
但是在ESXi里面设置好之后 还是无法更新时间,试过好多台都是一样,防火墙配置中已经看到 NTP客户端 出站许可的。 这个应该怎么办呢?
2013-02-01 21:45 更新
多谢大家,现在暂时非完美解决
-----------------------------------------
我用SSH登录到ESXi上 抓包可以看到NTP请求的包能发出去,但是回来的基本没有
然后在Windows服务器上 也抓包,看到有数据包收到,而且相应的数据包也发回去了。
只是有点区别,Windows客户端的NTP请求好像是 v3版本,而ESXi的NTP请求包是v2版本
后来我在Windows服务器上安装了单独的NTP服务(原先是用Windows自带的W32Time)
这下ESXi可以顺利更新时间,有一台不行,正准备重启,
另外这次在Windows服务器上抓包看到的是 v4,奇怪,也就是说ESXi的NTP请求包变成v4版本了
但是这样却出现了一个问题,Windows的客户端更新时间却不行了,不太明白为啥。

TiGi 发表于 2013-1-2 10:37:43

ESXi上的NTP,是手动启动还是自动启动?
有时候,需要重启一次ESXi主机的 —— 好像仅仅重启一次ESXi上的NTP也可以。

renlixing 发表于 2013-1-2 10:39:41

ESXI NTP也遇到过设置了NTP服务器,一直不生效,后来没办法加入AD,马上同步

sunyucong 发表于 2013-1-2 12:30:46

你配置了ntp服务器 还要启动ntp服务

sunyucong 发表于 2013-1-2 12:37:03

同步信息估计在 /var/log/message 或者 /var/log/hostd.log 里能看到

wesley_yang 发表于 2013-1-2 13:54:47

学习学习!!!

有容乃大 发表于 2013-1-2 14:52:56

我配置NTP server的时候,点选"重启NTP服务以更改应用"

Activer007 发表于 2013-1-2 16:16:48


重新启动过一台ESXi, 居然发现启动时卡住了,好像停顿在 “初始化 电源信息 ” 吓我一大跳 大过年的
后来强制关机重启又好了

Activer007 发表于 2013-1-2 10:37:00

本帖最后由 Activer007 于 2-1-2013 16:26 编辑
多谢大家,现在暂时非完美解决
-----------------------------------------
我用SSH登录到ESXi上 抓包可以看到NTP请求的包能发出去,但是回来的基本没有
然后在Windows服务器上 也抓包,看到有数据包收到,而且相应的数据包也发回去了。
只是有点区别,Windows客户端的NTP请求好像是 v3版本,而ESXi的NTP请求包是v2版本
后来我在Windows服务器上安装了单独的NTP服务(原先是用Windows自带的W32Time)
这下ESXi可以顺利更新时间,有一台不行,正准备重启,
另外这次在Windows服务器上抓包看到的是 v4,奇怪,也就是说ESXi的NTP请求包变成v4版本了
但是这样却出现了一个问题,Windows的客户端更新时间却不行了,不太明白为啥。

Activer007 发表于 2013-1-2 16:21:58


刚才看了一下 又忘记了,好像是/var/log/syslog
不过 我后来还是抓包了

Activer007 发表于 2013-1-2 16:23:17


我这边业务基本不需要用AD 所以没有搞AD
在网上搜索的时候 也看到有老外提到这个方法

Activer007 发表于 2013-1-2 12:37:00


嗯这个我懂得

eltonfive 发表于 2013-1-2 16:25:17

Configure ESX/ESXi NTP and Likewise Clients
Configure ESX/ESXi to synchronize time with the Windows server Active Directory Domain Controller:
    Connect to the ESX/ESXi host or vCenter Server using the vSphere Client.
    Select the ESX/ESXi host in the inventory.
    Click the Configuration tab.
    Under the Software heading, click Time Configuration.
    Click Properties.
    Ensure that the NTP Client Enabled option is selected.
    Click Options.
    Click NTP Settings.
    Click Add and specify the fully qualified domain name or IP address of the Windows server Domain Controller(s).
    Click OK.
    Click OK to save the changes.
Additional configuration must be done from the command line.
    Open a console to the ESX or ESXi 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).
    Open the file /etc/ntp.conf in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
    Add the tos maxdist command on its own line:
    tos maxdist 30
    Save the configuration file.
    Make the file /etc/likewise/lsassd.conf writable using the command:
    chmod +w /etc/likewise/lsassd.conf
    Open the file /etc/likewise/lsassd.conf in a text editor. For more information, see Editing configuration files in VMware ESXi and ESX (1017022).
    Locate the sync-system-time option, uncomment it, and set the value to no:
    sync-system-time = no
    Save the configuration file.
    On ESXi, save the configuration changes to the boot bank so they persist across reboots using the command:
    /sbin/auto-backup.sh
    Restart the ntpd and lsassd service for the configuration change to take effect using the commands:
    service lsassd restart
    service ntpd restart
    Note: To restart the ntpd and lsassd services on an ESXi host use these commands:
    ./etc/init.d/lsassd restart
    ./etc/init.d/ntpd restart
If the ntpd and lsassd services are not restarting, consider restarting the management agents first. For more information about restarting the management agent, see Restarting the Management agents on an ESX or ESXi Server (1003490).
Once the configuration changes are completed, ensure that the time is synchronized between the ESX/ESXi host and the Windows server. For more information, see Troubleshooting NTP on ESX and ESXi (1005092).
http://kb.vmware.com/selfservice ... ;externalId=1035833

konglongkdm 发表于 2013-1-2 10:39:00

没遇到过,不过可以/etc/init.d/ntpd status
ntpd is running   
先看下状态,如果正常的话
ntpq -p
   remote         refid      st t when poll reach   delay   offsetjitter
==============================================================================
*192.168.1.225   61.153.197.226   3 u678 1024377    1.859   -4.276   1.704
会有类似的结果,不行就
/etc/init.d/ntpd restart,指定好同步服务器先

Activer007 发表于 2013-1-2 16:25:28


暂时没有部署AD,so this is not work for me , but thx any way
页: [1] 2
查看完整版本: 设置NTP的问题,在那里看同步错误信息?