On 26/04/13 07:57, staticsafe wrote: > On 4/25/2013 19:50, Alan McKinnon wrote: >> On 26/04/2013 01:42, William Kenworthy wrote: >>> Does anyone know a good guide to using time sync in VM's, for both >>> windows and linux (gentoo) guests using libvirt? Especially for guests >>> that are resumed, or the whole virtualisation system is hibernated? (ntp >>> refuses to resync after guest pause/save/restore/resume (known problem), >>> even with "tinker panic 0" >> >> >> That's not a bug, it's by design. >> >> If ntpd detects the clock is out by more than X seconds [1], it will not >> try to correct the difference, concluding that something is wrong and a >> human must decide. It can't easily tell the difference between a resumed >> guest (or even that it was resumed at all) and a severe problem. >> >> We fixed this by taking the easy route of least resistance; >> >> 1. run ntpdate on startup/restart once before ntpd starts >> 2. start ntpd as normal >> 3. a colleague wrote a $MAGIC_HOOK to detect resumed guests that runs >> ntpdate once >> >> True, it's a brutal solution and uses a baseball bat where some finesse >> might be less ugly, but it suits our needs just fine. >> >> [1] I forget what X is and am too lazy to look it up. Is it 30 seconds >> or thereabouts? >> >> > > "When first started, the daemon normally polls the servers listed in the > configuration file at 64-s intervals. In order to allow a sufficient > number of samples for the NTP algorithms to reliably discriminate > between correctly operating servers and possible intruders, at least > four valid messages from the majority of servers and peers listed in the > configuration file is required before the daemon can set the local > clock. However, if the difference between the client time and server > time is greater than the panic threshold, which defaults to 1000 s, the > daemon will send a message to the system log and shut down without > setting the clock." [0] > > [0] - http://doc.ntp.org/4.1.1/debug.htm >
Keep reading :) Check out "tinker panic o" I mentioned, or the -g argument to ntpd The docs say its a "once only" adjustment in one place, but I am not sure thats actually the case. BillK