[Ma-linux] Virtual machine time sync after host resume
Przemek Klosowski
przemek.klosowski at nist.gov
Wed Nov 25 09:46:46 EST 2009
On 11/24/2009 09:31 PM, Joseph S D Yao wrote:
> On Tue, Nov 24, 2009 at 08:23:46PM -0500, Rich Renomeron wrote:
>> I have a gaggle of kvm/libvirt-managed virtual machines on my desktop
>> box, which occasionally gets suspended. When I resume the desktop, the
>> clock on the VMs is still at the host resume time. I've tried
>> installing NTP, but after an overnight suspend, it won't adjust the time
>> because the time difference is too great.
>>
>> The only solution I can think of is putting ntpdate in a cron job. Is
>> there a better way?
>
>
> I haven't done anything with suspend/resume besides disabling it [;-)],
> but can't you put a script in something like /etc/acpi/resume.d to run
> ntpdate?
>
>
That would work but ntpdate won't run unless you turn off ntpd
(they use the same socket), so the script has to be like this:
/etc/init.d/ntpd stop
ntpdate 0.fedora.pool.ntp.org
/etc/init.d/ntpd start
More information about the Ma-linux
mailing list