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?


-- 
Alan McKinnon
alan.mckin...@gmail.com


Reply via email to