<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 21, 2017 at 1:37 AM, ıuoʎ <span dir="ltr"><<a href="mailto:yonjah@gmail.com" target="_blank">yonjah@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Mon, Mar 20, 2017 at 9:58 PM, Timo Juhani Lindfors<br>
<<a href="mailto:timo.lindfors@iki.fi">timo.lindfors@iki.fi</a>> wrote:<br>
> ıuoʎ <<a href="mailto:yonjah@gmail.com">yonjah@gmail.com</a>> writes:<br>
>> I have a host running a few guests all configured to autostart.<br>
>> I'm also using libvirt-guests to suspend the guests when the host<br>
>> restarts or shuts down<br>
><br>
> I have a similar setup. I solved it by writing a small daemon that syncs<br>
> system time from RTC time if the error is larger than 10 seconds. This<br>
> guarantees that my VM time will be in sync with the host very fast. If<br>
> I'd run ntpd it would take minutes for the resumed VM to notice that<br>
> something happened.<br>
<br>
</span>Yea I created another systemd service that will sync the time of all<br>
running machines on host boot.<br>
I was just wondering if I was missing something with libvirt-guests<br>
and autostart.<br>
I haven't noticed any issues with the time discrepancies on running<br>
guests so I hope this will be enough.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div>Not tested myself, but in  /etc/sysconfig/libvirt-guests there is at the end this:</div><div><br></div><div><div># If non-zero, try to sync guest time on domain resume. Be aware, that</div><div># this requires guest agent with support for time synchronization</div><div># running in the guest. For instance, qemu-ga doesn't support guest time</div><div># synchronization on Windows guests, but Linux ones. By default, this</div><div># functionality is turned off.</div><div>#SYNC_TIME=1</div></div><div><br></div><div>From the comment contents it seems the default is actually 0, so if you have not already done it, you can put</div><div>SYNC_TIME=1</div><div><br></div><div>This I think requires also to install inside the guest the qemu-guest-agent package and enabling qemu-guest-agent service.</div><div>HIH,</div><div>Gianluca</div><div><br></div></div></div></div>