On Tue, Oct 6, 2009 at 09:50, Robbie A. Garrett <RGarrett@hostourweb.com> wrote:> 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?double click the little clock/calander on the left hand side of the bar at the bottom of the screen? :-) The easiset, most reliable thing for you to do, before diving deeper into the assundry issues with VMs and time keeping (and clock drift is a big Xen problem, but it is NOT a Xen ONLY problem) is use NTP. The simplest fix I found to fix clock drift issues in VMs, be it on Xen or VMWare was to set up an NTP server that synced to some outside NTP source and have all my VMs then sync via NTPd to my private time server. This kept them all up to date. Cheers Jeff -- Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@lists.xensource.com http://lists.xensource.com/xen-users
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@hostourweb.com] Sent: Tuesday, October 06, 2009 10:26 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 09:51 To: xen-users@lists.xensource.com 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@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Oct 6, 2009 at 17:00, Robbie A. Garrett <RGarrett@hostourweb.com> wrote:> 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.What does "date -u" show? Is your hardware clock in UTC or localtime? -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn''t become a monster. Friedrich Nietzsche _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Oct 6, 2009 at 17:15, Robbie A. Garrett <RGarrett@hostourweb.com> wrote:> date -u > Tue Oct 6 15:17:44 UTC 2009 > > i have no idea what hardware clock is set to.. if that setting is in the bios i will never mind out until the next patch cycle.As "date -u" returns the right time, I''m pretty confident your Linux install knows what''s going on so you shouldn''t be a thousand miles away from getting it right. What do the following return: date echo $TZ -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn''t become a monster. Friedrich Nietzsche _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 12:01 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@hostourweb.com] Sent: Tuesday, October 06, 2009 10:26 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 09:51 To: xen-users@lists.xensource.com 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@prd-inc.com] 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@hostourweb.com] Sent: Tuesday, October 06, 2009 10:26 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 09:51 To: xen-users@lists.xensource.com 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@lists.xensource.com http://lists.xensource.com/xen-users
date -u Tue Oct 6 15:17:44 UTC 2009 i have no idea what hardware clock is set to.. if that setting is in the bios i will never mind out until the next patch cycle. ________________________________________ From: xen-users-bounces@lists.xensource.com [xen-users-bounces@lists.xensource.com] On Behalf Of Rob MacGregor [rob.macgregor@gmail.com] Sent: Tuesday, October 06, 2009 11:13 AM To: XEN Mailing List Subject: Re: [Xen-users] Clock time off in windows On Tue, Oct 6, 2009 at 17:00, Robbie A. Garrett <RGarrett@hostourweb.com> wrote:> 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.What does "date -u" show? Is your hardware clock in UTC or localtime? -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn''t become a monster. Friedrich Nietzsche _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
yes the system displays the correct UTC time. date Tue Oct 6 11:23:55 EDT 2009 echo $TZ is blank. ________________________________________ From: xen-users-bounces@lists.xensource.com [xen-users-bounces@lists.xensource.com] On Behalf Of Rob MacGregor [rob.macgregor@gmail.com] Sent: Tuesday, October 06, 2009 11:20 AM To: XEN Mailing List Subject: Re: [Xen-users] Clock time off in windows On Tue, Oct 6, 2009 at 17:15, Robbie A. Garrett <RGarrett@hostourweb.com> wrote:> date -u > Tue Oct 6 15:17:44 UTC 2009 > > i have no idea what hardware clock is set to.. if that setting is in the bios i will never mind out until the next patch cycle.As "date -u" returns the right time, I''m pretty confident your Linux install knows what''s going on so you shouldn''t be a thousand miles away from getting it right. What do the following return: date echo $TZ -- Please keep list traffic on the list. Rob MacGregor Whoever fights monsters should see to it that in the process he doesn''t become a monster. Friedrich Nietzsche _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
that fixes it! thanks! ________________________________________ From: Dustin Henning [Dustin.Henning@prd-inc.com] Sent: Tuesday, October 06, 2009 11:22 AM To: Robbie A. Garrett Cc: ''XEN Mailing List'' Subject: RE: [Xen-users] Clock time off in windows 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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 12:01 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@hostourweb.com] Sent: Tuesday, October 06, 2009 10:26 To: Dustin.Henning@prd-inc.com 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@prd-inc.com] 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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Robbie A. Garrett Sent: Tuesday, October 06, 2009 09:51 To: xen-users@lists.xensource.com 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@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users