------------------------------------------------------------ revno: 257 committer: Sylvain Beucler <[email protected]> branch nick: infra timestamp: Tue 2011-01-11 23:36:18 +0100 message: Add xen time drift work-around added: functions/xen-domu-time-drift.txt
=== added file 'functions/xen-domu-time-drift.txt' --- a/functions/xen-domu-time-drift.txt 1970-01-01 00:00:00 +0000 +++ b/functions/xen-domu-time-drift.txt 2011-01-11 22:36:18 +0000 @@ -0,0 +1,22 @@ +# In some versions of Xen, the VMs' time desync. +# Here's a fix recommended by FSF sysadmin Bernie Innocenti + +aptitude install ntpdate +cat >/etc/cron.d/ntpdate <<__EOF__ +# Make sure that our clock stays more or less within sync +# The clock-sync script automatically adjusts if it is run on a Xen domU + +0 * * * * root /usr/local/bin/clock-sync.sh +__EOF__ +cat >/usr/local/bin/clock-sync.sh <<__EOF__ +#!/bin/sh + +if [ -d /proc/sys/xen ]; then + echo 1 > /proc/sys/xen/independent_wallclock; + /usr/sbin/ntpdate pool.ntp.org >> /dev/null 2>&1 +else + /usr/sbin/ntpdate pool.ntp.org >> /dev/null 2>&1 + /sbin/hwclock -w +fi +__EOF__ +chmod 755 /usr/local/bin/clock-sync.sh
_______________________________________________ Savannah-cvs mailing list [email protected] http://lists.gnu.org/mailman/listinfo/savannah-cvs
