Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have 5 virtual Windows 2003 servers running Citrix in our company, that users can log onto, Every so often one of the servers will change it's date/time so far ahead, users are unable to log on because of the time difference between the 2003 server(s) and the DC (server 2008).

I have to log into the servers and manually change the date/time to enable users to be able to log in.

The regions are all set correctly, the commands I have used:

net time setsntp:dcbox net stop w32time net start w32time w32tm /resync /rediscover

and

net time /domain /set

These commands set the system time to the time of the DC, however the settings may last a few days or a few weeks its unpredictable.

I have also noticed that the affected server does not restart overnight (scheduled to restart around midnight) and in the event viewer the date jumps from 6/9/11 to 9/9/11 at around 7.50pm

Any help would be much appreciated.

share|improve this question

3 Answers 3

You didn't mention your virtualisation platform; is it VMWare? We've had issues with VMs losing time, which I assumed were due to the VMs sharing their host's CPU. There's an option in VMWare tools to synchronise the VMs clock with their host's, which might help.

Also, I assume dcbox is your domain controller? If the sync problems are due to the fact that the servers are virtual, you might have more success syncing with an external NTP server instead, like pool.ntp.org.

share|improve this answer
    
Sorry, we are using XenCenter and 4 XenServers, each XenServer host at least 2 virtual servers and I have removed the DC name for the purpose of security. We thought of creating a script that syncs with an external NTP every x minutes. –  Z Holt Sep 7 '11 at 8:25
    
That ought to do it; you shouldn't need a script, though, just an appropriately configured NTP service pointing at an external source. –  RainyRat Sep 7 '11 at 8:36
    
How would you suggest pointing to the external source, via cmd or regedit? –  Z Holt Sep 7 '11 at 8:41
    
Personally I'd go for regedit, as you can keep the required settings in a .reg file for easy application if you need to rebuild a server or add a new one. The time server's address goes in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters, in a REG_SZ value called "NtpServer" –  RainyRat Sep 7 '11 at 9:40

net time is deprecated, so you should use w32tm to configure your time sync settings.

Running the command Net time /querysntp displays the name of a Network Time Protocol (NTP) server with which a computer is configured to synchronize, but that NTP server is used only when the computer’s time client is configured as NTP or AllSync. Most domain member computers have a time client type of NT5DS, which means that they synchronize time from the domain hierarchy.

The command you need is either of these:

w32tm /config /syncfromflags:MANUAL /manualpeerlist:"dcbox_ip_here"

(sets to manually sync from a chosed source) or

w32tm /config /syncfromflags:DOMHIER /update

(sets to automatically sync from your domain's heirachy)

Then follow the command with both of these:

net stop w32time

net start w32time

You must also ensure that your guest additions installed within the VM is not causing your VM to sync from it's host. If it is, you must ensure the host's time is highly accurate (again,configure it's NTP settings using it's native NTP client, as a script is not a suitable subsitute as Rainy mentioned).

You may also need to increase the frequency with which NTP on the guest checks it's time source, and increase the value of 'max drift until I give up and stop syncing'.

share|improve this answer

Ok after I manually set the peer list to uk.pool.ntp.org,0x1 the time has screwed up again.

After 19.58pm 13/09/2011 the event viewer shows that the systems time changes to 08.38am 14/09/2011, a few print jobs occur and then the date/time changes to the 06.26am 15/09/2011, and then finally the date/time changes to 06.05am 19/09/2011.

I cannot think of any other reason why this keeps happening

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.