Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

NTP Setup on ESX 3.0

  • Filter
  • Time
  • Show
Clear All
new posts

  • NTP Setup on ESX 3.0


    New to this, so I apologise if posting in the wrong area.

    I have just setup the NTP client on 3 ESX 3.0 servers following this KB. playKC&externalId=1339 I had to do a service mgmt-vmware restart to get the changes to show up in the MUI of each ESX server, but it all looks ok. I then followed this article to set my VM's to get their time from the ESX host via the tools. playKC&externalId=1318 To check my config, I moved a test servers time on by 10 minutes and restarted, but the time still stayed 10 mins out of sync. I ran watch "ntpq -p" on each ESX host, the results of one are below.

    Every 2s: ntpq -p Thu Aug 28 15:06:57 2008

    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    *LOCAL(0) LOCAL(0) 10 l 12 64 377 0.000 0.000 0.031 16 u - 512 0 0.000 0.000 4000.00 16 u - 512 0 0.000 0.000 4000.00
    arethusa.tweake 16 u - 512 0 0.000 0.000 4000.00

    Shouldn't I be seeing the external time sources being polled and why didn't my VM's time update when I have it set to get it's time through the tools??

    My firewall is set to allow NTP port 123 outbound and I have also set the following on each ESX host esxcfg-firewall --openport 123,udp,out,NTP_OUT just in case, but still no joy.

    New to the Linux stuff, so not sure if this is right, wrong, working or otherwise, so please bear withh me on this one!

    Any help very much appreciated.


  • #2
    Re: NTP Setup on ESX 3.0

    Personally, I've struggled somewhat with NTP and ESX.

    For openers, I don't sync guest VMs clocks with ESX host clocks, ever. Since the majority of my VMs are Windows, I let the Windows Time Service within the domain handle time sync.

    One thing that you will observe regardless of how you have your time sync set up is that when you power on a VM, it will initially inherit its time from the ESX host. How the VM time is handled after the VM boots up depends on the time sync configuration.
    -If VMware Tools is configured to sycn VM time with the host, there'd effectively be no change after the OS boots up. The VM will still maintain the same time as the host
    -IF the VMware Tools is configured to NOT sync time with the host, a few outcomes may happen
    1. If the VM's guest OS is configured to sync time through an external NTP time source or a Windows domain, time will be sync'd unless there is too much drift such that time is not adjusted at all (This can and does happen with the Windows Time Service if there is too much drift from domain controller time)
    2. If the VM's guest OS is not configured to sync time through an external NTP time source, there will be no change in time and the VM will maintain time it inherited from the ESX host at power on.

    After reading #1 above, if you have Windows VMs in a domain, you can understand now what it would be important to maintain nearly accurate ESX host time from a VM guest OS perspective - because VMs initially inherit their time from the ESX host at power on and too much drift will cause their time to not ultimately be corrected once the guest VM is booted up.

    Now, the part of ESX host NTP that I have struggled with: NTP configuration on ESX hosts doesn't always seem to be reliable. For whatever reason, on some ESX hosts, I'll discover significant and unacceptable clock drift. I do not know why NTP on ESX is not doing its job sometimes. It's not 100% consistent so it's not an easy problem to troubleshoot. My best guess is that initially NTP is working properly, but at some point on an ESX host that has not been rebooted in X amount of time, the NTP daemon crashes (or something) and that is the point where time begins to drift until an administrator discovers the problem and fixes it.

    VCDX3 #34, VCDX4, VCDX5, VCAP4-DCA #14, VCAP4-DCD #35, VCAP5-DCD, VCPx4, vEXPERTx4, MCSEx3, MCSAx2, MCP, CCAx2, A+ - VMware Virtualization Evangelist
    My advice has no warranties. Follow at your own risk.