To the contrary, this makes perfect sense. I may have been wrong about the
time that Xen provides to the domU, though, it looks like Xen provides the
time that dom0 displays (vs the actual time in the bios) to the domU.
When you ran hwclock before, it automatically converted your system time to
EDT even though it is actually stored as UTC, this is why the time was right
before and with --utc. Reboot into the BIOS and you will see the clock
showing 4 hours fast (because EDT is GMT/UTC-4hours and *nix is dealing with
this). When you run hwclock --localtime, *nix assumes the system time is
current time vs localtime, this is why you get a result that is four hours
fast in this scenario.
Your Windows VM is an additional 4 hours behind (not 3), because it is also
assuming the system clock is UTC, but Xen is giving it a system clock with
GMT/UTC-4 (local time).
In your HVM domU config (assuming you are using config files and not
libvirt), there should be an option commented out like "localtime=0" that
you should change to "localtime=1" (or vice versa, change it from what it is
or uncomment it to enable it as the case may be), then shutdown/destroy the
domU and recreate it and it should have the right time.
If that doesn't work, what I do (since it doesn't work on mine) is use
"rtc_timeoffset=-18000". This year, Windows somehow decided to adjust for
EDT this year where in prior years I have had to change it to
"rtc_timeoffset=-14400" during daylight time.
If you are using libvirtd, hopefully someone else can tell you how to change
the equivalent settings or you can find out by searching.
Good luck,
Dustin
-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Robbie A.
Garrett
Sent: Tuesday, October 06, 2009 12:01
To: Dustin.Henning@xxxxxxxxxxx
Cc: 'XEN Mailing List'
Subject: RE: [Xen-users] Clock time off in windows
im sorry i should been more clear.
case in point.
windows says is 7:03am
linux says is as follows.
/sbin/hwclock --utc
Tue 06 Oct 2009 11:03:38 AM EDT -0.168990 seconds
/sbin/hwclock --localtime
Tue 06 Oct 2009 03:03:47 PM EDT -0.659618 seconds
nothing makes sense.
________________________________________
From: Dustin Henning [Dustin.Henning@xxxxxxxxxxx]
Sent: Tuesday, October 06, 2009 9:59 AM
To: Robbie A. Garrett
Cc: 'XEN Mailing List'
Subject: RE: [Xen-users] Clock time off in windows
Didn't mean to go off list with my previous response... As EST is
GMT-5 and EDT is GMT-4, I don't see why you would be off by more than one
hour unless you were off by 4 or 5 because Windows is set to EDT or EST (if
the hardware clock is running at UTC, but *nix is showing you EDT, see
output below).
[virtadmin@virt1 ~]$ /sbin/hwclock
Tue 06 Oct 2009 09:34:20 AM EDT -0.562747 seconds
[virtadmin@virt1 ~]$ /sbin/hwclock --utc
Tue 06 Oct 2009 09:34:23 AM EDT -0.369329 seconds
[virtadmin@virt1 ~]$ /sbin/hwclock --localtime
Tue 06 Oct 2009 01:34:26 PM EDT -0.014150 seconds
As can be seen here, hwclock shows EDT and the right time, but only because
it either A) defaults to assuming --UTC or B) knows the system is in UTC
based on the appropriate setting. The BIOS actually shows a time of
05:34:xx (24hr). When I told hwclock that the system clock was on local
time (GMT-4), it showed me a time that was off by 4 hours (not 3).
Windows should automatically do NTP, so I am not sure that ntp will work
with your current domU config (I am not 100% certain it will work for any
HVM config, for that matter). However, I know it is possible to tell *nix
to make the system clock use local time and it is possible to make Windows
treat the system clock as UTC; either of these should help if the problem is
that they aren't using the same option. Unfortunately, I can't tell you off
the top of my head how to make either change, so you will have to search.
Alternatively, try setting up Windows Time to use one of the ntp servers
from pool.ntp.org, I am guessing you are in NA, so see
http://www.pool.ntp.org/zone/north-america. If this solves your problem,
then maybe it wasn't related to UTC vs ExT after all. Lastly, assuming NTP
isn't working and you can't find the other options, there is an option in
the domU config for whether to provide the domU system clock time in local
or UTC, but I don't know for sure how it works because it doesn't work on
the version I am running.
Dustin
-----Original Message-----
From: Robbie A. Garrett [mailto:RGarrett@xxxxxxxxxxxxxx]
Sent: Tuesday, October 06, 2009 10:26
To: Dustin.Henning@xxxxxxxxxxx
Subject: RE: [Xen-users] Clock time off in windows
hwclock on xen domU shows EDT. Windows is using EST time.
________________________________________
From: Dustin Henning [Dustin.Henning@xxxxxxxxxxx]
Sent: Tuesday, October 06, 2009 9:07 AM
To: Robbie A. Garrett
Subject: RE: [Xen-users] Clock time off in windows
That depends why it is off. If it is off by exactly 3 hours to the
second because you live in GMT +/-3 and your system clock is on UTC per *nix
default, then you can either tell *nix to use GMT +/-3 instead of UTC so
that Windows will see the appropriate time, or you can find the registry
setting for Windows to use UTC so Windows will show the appropriate time.
However, if it is off by ~3 hours because it has gotten off over time, then
you will either need to fight with xen to keep the time right or, if
possible, use Windows Time to sync with the appropriate NTP pool (I say if
possible because an HVM may not support the domU setting its own time, but I
have mine set up this way whether that is why they are right or not). Good
luck,
Dustin
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Robbie A.
Garrett
Sent: Tuesday, October 06, 2009 09:51
To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Clock time off in windows
Hey all,
my clock in my windows 2003 server VM running in xen is off by three hours.
any idea how i can fix this?
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|