1 |
On 4/25/2013 19:50, Alan McKinnon wrote: |
2 |
> On 26/04/2013 01:42, William Kenworthy wrote: |
3 |
>> Does anyone know a good guide to using time sync in VM's, for both |
4 |
>> windows and linux (gentoo) guests using libvirt? Especially for guests |
5 |
>> that are resumed, or the whole virtualisation system is hibernated? (ntp |
6 |
>> refuses to resync after guest pause/save/restore/resume (known problem), |
7 |
>> even with "tinker panic 0" |
8 |
> |
9 |
> |
10 |
> That's not a bug, it's by design. |
11 |
> |
12 |
> If ntpd detects the clock is out by more than X seconds [1], it will not |
13 |
> try to correct the difference, concluding that something is wrong and a |
14 |
> human must decide. It can't easily tell the difference between a resumed |
15 |
> guest (or even that it was resumed at all) and a severe problem. |
16 |
> |
17 |
> We fixed this by taking the easy route of least resistance; |
18 |
> |
19 |
> 1. run ntpdate on startup/restart once before ntpd starts |
20 |
> 2. start ntpd as normal |
21 |
> 3. a colleague wrote a $MAGIC_HOOK to detect resumed guests that runs |
22 |
> ntpdate once |
23 |
> |
24 |
> True, it's a brutal solution and uses a baseball bat where some finesse |
25 |
> might be less ugly, but it suits our needs just fine. |
26 |
> |
27 |
> [1] I forget what X is and am too lazy to look it up. Is it 30 seconds |
28 |
> or thereabouts? |
29 |
> |
30 |
> |
31 |
|
32 |
"When first started, the daemon normally polls the servers listed in the |
33 |
configuration file at 64-s intervals. In order to allow a sufficient |
34 |
number of samples for the NTP algorithms to reliably discriminate |
35 |
between correctly operating servers and possible intruders, at least |
36 |
four valid messages from the majority of servers and peers listed in the |
37 |
configuration file is required before the daemon can set the local |
38 |
clock. However, if the difference between the client time and server |
39 |
time is greater than the panic threshold, which defaults to 1000 s, the |
40 |
daemon will send a message to the system log and shut down without |
41 |
setting the clock." [0] |
42 |
|
43 |
[0] - http://doc.ntp.org/4.1.1/debug.htm |
44 |
-- |
45 |
staticsafe |
46 |
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org |
47 |
Please don't top post - http://goo.gl/YrmAb |
48 |
Don't CC me! I'm subscribed to whatever list I just posted on. |