From: Keir F. <Kei...@cl...> - 2003-10-27 17:11:27
|
> I have a strange problem. One of my various xen test boxes doesn't > accept to set its time. Basically, it's stuck to RTC time. > > ntpdate, date, hwclock all "seem" to work, but they don't actually > change the system time. The only way I have to change it right now is > to change it in the BIOS, which is not a good thing. The checked-in tree (ssh://xe...@xe.../xeno-unstable.bk) now contains a number of fixes for the handling of time. Briefly, Xen now reads the RTC at start of day and by default will track that with the precision of the periodic timer crystal. Xen's estimate of the wall-clock time can only be updated by domain 0 (this may be fixed in the future by introducing some access/update capabilities). If domain 0 runs ntpdate, ntpd, etc. then the synchronised time will automatically be pushed down to Xen every minute (and written to the RTC every 11 minutes, just as normal x86 Linux does). All other domains always track Xen's wall-clock time: setting the date, or running ntpd, on these domains will not affect their wall-clock time!! If this is a problem then I can add a sysctl which would turn this off if desired (i.e., setting the flag would prevent the domain from tracking Xen's estimate of wall-clock time). Note that the wall-clock time exported by Xen is UTC --- all domains must have appropriate timezone handling (eg. a correct /etc/localtime file). Hope this is useful! Keir Fraser |