Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Server system date synchronizaion
Date: Thu, 25 Apr 2013 23:51:34
Message-Id: 5179C140.3070902@gmail.com
In Reply to: Re: [gentoo-user] Server system date synchronizaion by William Kenworthy
1 On 26/04/2013 01:42, William Kenworthy wrote:
2 > Does anyone know a good guide to using time sync in VM's, for both
3 > windows and linux (gentoo) guests using libvirt? Especially for guests
4 > that are resumed, or the whole virtualisation system is hibernated? (ntp
5 > refuses to resync after guest pause/save/restore/resume (known problem),
6 > even with "tinker panic 0"
7
8
9 That's not a bug, it's by design.
10
11 If ntpd detects the clock is out by more than X seconds [1], it will not
12 try to correct the difference, concluding that something is wrong and a
13 human must decide. It can't easily tell the difference between a resumed
14 guest (or even that it was resumed at all) and a severe problem.
15
16 We fixed this by taking the easy route of least resistance;
17
18 1. run ntpdate on startup/restart once before ntpd starts
19 2. start ntpd as normal
20 3. a colleague wrote a $MAGIC_HOOK to detect resumed guests that runs
21 ntpdate once
22
23 True, it's a brutal solution and uses a baseball bat where some finesse
24 might be less ugly, but it suits our needs just fine.
25
26 [1] I forget what X is and am too lazy to look it up. Is it 30 seconds
27 or thereabouts?
28
29
30 --
31 Alan McKinnon
32 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Server system date synchronizaion staticsafe <me@××××××××××.ca>