The problem you have sir, is time.

Hello internet!  Sorry I’ve not posted on here in a while.  As some of you know from my twitter feed I’ve recently had a new addition to my family – a baby boy – who is keeping me rather busy and blogging has needed to take a back seat.  I have also re-located to a new town so I’ve been waiting for my internet connection to be hooked up amongst other things, like plumbers and electricians.  Busy busy busy. 

Anyway you don’t come here to read about family life so I’ll get onto my next post.  This one will be about time, and how it can trip you up.

I recently had an issue with time (don’t we all!?) that was affecting site components.  It was only by chance that I discovered that my remote distribution points clock had drifted out of sync with the site servers clock by eleven minutes.  After a little digging around it seems that ten minutes is the threshold and anything over that will cause issues.  I noticed that my site component SMS_DISTRIBUTION_MANAGER had what seemed like millions of error lines in the log and I could see from the distmgr.log that there was clearly an issue.

Site Component Log


Nightmare!  Right OK so lets examine the time situation and sort this out once and for all.

My site server is a VM that's on a Hyper-V host.  I first fire up a PowerShell window and throw the following command to query the time server source:

   1: w32tm /query /source

Here are the options you may see:
VM IC Time Synchronization Provider = Hyper-V Time Sync Integration Services
DomainController.domain.whatever = Time is synced to the DC, it will show the FQDN of your PDCe = example will show if this is the time server you set.
Local CMOS Clock = No time sync, time is run off the CMOS clock, this is bad. Really bad.

TIP! you can also use the /computer:xxxxx switch to specify another computer to query, obviously replacing xxxxx with the computer name or FQDN of the computer.

My results are not quite what I expected to see and so I am going to examine the hierarchy of it all and set it up as I want to.  First thing is first, here is a diagram of how I want this to be set up:


In this illustration, my Hyper-V host will sync its time to and the VM’s on that host will use Hyper-V Integration services to sync their time to the host.  Simple right?

So firstly I’ll examine the host and check that the correct setting is switched on for each VM.  Using Hyper-V manager, select the VM and look at the settings, then under Integration Services ensure that Time Synchronisation is ticked as it is here:


Next we will use the following command in PowerShell to set the Hyper-V host to use our preferred time source:

   1: w32tm /config /syncfromflags:MANUAL / /update

Breaking this command down to better understand it:

/config – Enters configuration mode
/syncfromflags:MANUAL – Sets time to use a manually specified source. (you can use DOMHIER as well if you want to set it up that way)
/ –Sets the list of time sources you want to use
/update – Changes cannot be made until either the time service is restarted or the update switch is used.

(again you can use the /computer:xxxxx switch if you need to)

Now when I query the source on the host I get the following:


When I query the three VM’s on that host I get the following results:


So now I’m happy that everything is set up correctly at the remote site.  I know my ConfigMgr site server set up is correct as I’ve used the same method;


I compare the times between the Site Server and the remote Distribution Point and they exactly match up.

I now attempt to redistribute any failed packages and they start & complete without issues.  WINNER!
I now attempt to connect remote WMI and it also works without issue. WINNER!

Next I clear the errors for the SMS_DISTRIBUTION_MANAGER component and reset all the counts.  24 Hours late everything is running fine!

Sometimes strange errors don’t always have a complicated fix or demand lots of your time trawling through logs, sometimes the simplest solution is all that's needed.  I lost a good few hours to attempting to find out what the problem was here and it was only when my wife said to me “what's the time?”,  that I noticed it was out of sync on my servers.  I could have saved myself some of my own time by looking at this first so here is my attempt and saving some of yours.

I hope this was useful to you and thanks for reading.

Link – Configuring Windows time for Active Directory
Link – Time Synchronisation in Hyper-V
Link - W32tm