[libvirt-users] Time syncing after VM suspend/resume

Mark Clarkson mark.clarkson at smorg.co.uk
Wed Sep 23 22:05:25 UTC 2015


On Wed, 2015-09-23 at 23:54 +0200, Jérôme wrote:
> Le Thu, 24 Sep 2015 05:32:45 +0800,
> Bill Kenworthy <billk at iinet.net.au> a écrit :
> 
> > Look into the "panic" option to ntpd - once the gap gets to big
> > (such
> > as when the VM is suspended for a few hours) it goes into freewheel
> > and doesn't sync - its in the ntp docs.
> 
> My use case is when rebooting the host (after a kernel update, for
> instance). The gap is about 2 minutes.
>  
> > ntpd doesn't work well (you get ages where a machine is way out of
> > date, or fails to sync ever.  I run either chrony (same problem) or
> > ntpd and run a script on startup to restart guest ntp/chrony from
> > the
> > host via ssh.
> 
> The guest-set-time command from the host works as well (but requires
> guest agent). I just don't know how to launch it automatically on
> guest
> resume.
> 
> > I don't think serious users suspend vm's much or this would have
> > been
> > fixed long ago.
> 
> Interesting answer.
> 
> I figured that while interrupting the host for a few minutes,
> suspending the guest could be a nicer option. I may be wrong.
> 
> Anyway, the host shall not be rebooted that often, and I think if I
> don't find any satisfying answer, I may choose guest shutdown instead
> of suspend.
> 
> In practice, my guests will likely have the same OS version,
> therefore
> the same updates and the same reboot needs. There's no point
> suspending
> a guest when rebooting the host if the guest must be rebooted anyway.
> 

VMWare has the same problem[1], and as someone else said 'tinker panic
0' should fix it. It's worked for me in the past.

See the NTP Recommendations section in:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cm
d=displayKC&externalId=1006427






More information about the libvirt-users mailing list