1

I'm looking for guidance on how to best configure a group of four Windows Server 2008 VMs (two on one host, and two more on another), so that they maintain accurate time, across reboots/shutdowns. I'm using ESX Server 3.5 and vCenter Server 2.5. In particular, I'm trying to do this without a domain controller.

Right now, I have VMware Tools installed on each of the server VMs with 'Time synchronization...' unchecked. Instead, I have Windows setup to automatically update the clock periodically from time.nist.gov. Finally, I have the NTP client is disabled on the two VM hosts (just using the local server time).

With this setup, time remains synced up until the point that I have to restart/shutdown the servers, after which point there is a +/- five to ten second difference between certain servers. I'm sure there must be a better way to do this, however, must articles that I have come across call for a domain controller (which I do not have).

Thanks for any suggestions you may have!

5 Answers 5

4

Use VMware Tools to sync time in the guest with the host, and configure your hosts to sync to an NTP server (either on your LAN or out on the Internet).

You can get an obscene level of detail from VMware about timekeeping and best practices in this document.

0

One option would be to configure a machine on your LAN (doesn't have to be server grade - even an old PC) to be your time server. Scheduled task on this to update the time frequently. Point all your servers (including ESX) at this machine, and then force them to update their time on startup via a scheduled task.

There are probably cleaner solutions, but this will work.

0

What you are looking for is a program called Meinberg NTP Software, and run it as a service.

Install this, point it to your friendly NTP server, and it will keep all the times perfectly sync'd, even in a VM environment, where time is a fluid process.

0

I usually sync VMs with the host machine (which in turn syncs with the main clock source on the network, the router box in my case, which syncs with external NTP srouces in *.pool.ntp.org.

I use http://www.meinberg.de/english/sw/ntp.htm as the client in Windows based VMs. Make sure that you have tinker panic 0 in the config file (people often recommend it be the first non-comment line, though I don't know as that is strictly necessary) otherwise it will give in if the clock skews too far during a sudden burst of load in the VM or elsewhere on its host.

Also make sure all other time sync tools, including VMWare's, are turned off otherwise they and NTPd will trip over each other.

0

I'm not sure how the fact that these are virtual machines changes the situation, can you not just do, from an elevated command prompt:

w32tm /config /update /manualpeerlist:your.chosen.ntp.server.com /syncfromflags:manual

to use the windows time service to sync ntp.

do:

net stop w32time
net start w32time

to restart the time service and kick it into action without a reboot.

You can do

w32tm /query /status

to check what's going on (although who in the windows team came up with that syntax?!).

The remarkably unhelpful official docs are here:

http://technet.microsoft.com/en-us/library/bb491016.aspx

and there's a more helpful primer in word doc format here:

http://www.mmmug.co.uk/files/216/download.aspx

2
  • According to Vmware If many VMs try to correct the clock, they can actually make the timekeeping worse. Say if your 1 second behind and two VMs decide to add 1 second. You will now be 1 second ahead.
    – Zoredache
    Dec 10, 2009 at 1:20
  • Can you not just choose to not sync the vms with the host?
    – Whisk
    Dec 10, 2009 at 11:17

You must log in to answer this question.