|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Disabling clock set in PV boot?
Evan Lavelle wrote:
Roy wrote:
I think that message is from CentOS (/etc/rc.sysinit) setting the
clock from the hardware clock.
You're right, but unfortunately it doesn't help. rc.sysinit attempts
to run 'hwclock --hctosys' to set the system time from the Hardware
Clock. This is fine for non-Xenned kernels. In a Xen guest kernel,
however:
1 - 'date' already shows the valid Dom0 time *before* 'hwclock
--hctosys' is run; on bare metal, 'date' would have some sort of
default value here
2 - hwclock fails, because guests don't have access to the "Hardware
Clock"
3 - rc.sysinit then runs 'date' to get the system time to produce this
boot message:
Setting clock (localtime) Fri Oct 16 09:43:52 BST 2009 [ OK ]
Note that this message is wrong for a Xen guest - the system clock set
actually failed. The message just shows the Dom0 time that Xen has
provided as the initial value of the system time.
Does anyone know how/where Xen actually sets the initial value of
'date', and whether it can be disabled?
Incidentally, 'independent_wallclock' is incorrectly named. If the
guest wallclock was actually independent, then Dom0 wouldn't set it
during boot. What it seems to mean is 'guest can set its own time, but
only after Xen has already set the initial value'.
Thanks -
Evan
The current time is passed to the DomU during the startup. The PV
kernel uses it to initialize things.
Why not just override the clock during startup by setting it in
/etc/rc.sysinit via date to whatever value you want?
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|