I''ve been having trouble keeping my time correct on some fully virtualized Xen domUs (CentOS 5.2 x86_64), so I looked through the archives and saw this posting about "independent_wallclock": article.gmane.org/gmane.comp.emulators.xen.user/647 And this one about fighting among Doms to control the time: thread.gmane.org/gmane.comp.emulators.xen.user/537/focus=665 I can''t find any "/proc/sys/xen/independent_wallclock" on any of my domUs so I imagine the comments about fighting for control of the time does not apply to me, because it is only applicable to paravirtualized doms. In my case, I should just be able to run ntpd on my domUs and ntpd should maintain the correct time on each domU, correct? Thanks, James ______________________________________________________________________ This email has been scanned for viruses and spam by the MessageLabs Email Security System. ______________________________________________________________________ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi James, first you have to run ntpd in Dom0 and let him sync to some timeservers on the web. This ntpd can sync the hardware clock, which your DomUs are not allowed to do. They have to sync with your Dom0. It shouldn''t be necessary to install another ntpd in your DomUs. If it''s not getting better, install ntpd in your DomUs and let him sync to your Dom0. Kind Regards Peter Mueller James Treleaven schrieb:> I''ve been having trouble keeping my time correct on some fully > virtualized Xen domUs (CentOS 5.2 x86_64), so I looked through the > archives and saw this posting about "independent_wallclock": > article.gmane.org/gmane.comp.emulators.xen.user/647 > > And this one about fighting among Doms to control the time: > thread.gmane.org/gmane.comp.emulators.xen.user/537/focus=665 > > > I can''t find any "/proc/sys/xen/independent_wallclock" on any of my > domUs so I imagine the comments about fighting for control of the time > does not apply to me, because it is only applicable to paravirtualized > doms. > > In my case, I should just be able to run ntpd on my domUs and ntpd > should maintain the correct time on each domU, correct? > > Thanks, > James > > ______________________________________________________________________ > This email has been scanned for viruses and spam by the MessageLabsEmail Security System.> ______________________________________________________________________ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > lists.xensource.com/xen-users- -- Mit freundlichen Grüßen Peter Müller Servator Support Bachstr. 38 65629 Niederneisen Tel.: (+49)6432/800850 Tel.: (+49)6432/6440059 Fax.: (+49)6432/910584 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org iQEcBAEBAgAGBQJJGVTnAAoJEIZStxVutoo80MoH/ijwyp+7ZHR5+pfqrhekuFS/ rUemq5en8c5xLOvyRBIg0QkYIfQ/f+hhZ8AZ+8kw8iK7cx8A+bJ9xPUfVtwXwq7s YOEpMsWVXDrXm3tv2GsBUwFcdNaEeM1tNfe2uTH2UA3HxeMqP+Mh87p8oowA7Vvl aN5GlpJr/2e3TrkzdbNkzW6i6c8IRqelQIx/a6BZYZF9q3bStp+myNgf4OmUzqDr embJDJap62awKx6qHjdcGlmsSGJGkmrvZhG8m4CbiofjiUSrRSJA0UAzUJyartF/ 2ijigbwepTU0tgbQn8m1EPunHxnb0TO52pkKdwRN47sOJsIIL62y3ybcCMNlwFI=jXh1 -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
On Tue, Nov 11, 2008 at 10:48:23AM +0100, Peter Mueller wrote:> first you have to run ntpd in Dom0 and let him sync to some > timeservers on the web. This ntpd can sync the hardware clock,Sure? I think only hwclock can set the host''s RTC. Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rainer Sokoll schrieb:> On Tue, Nov 11, 2008 at 10:48:23AM +0100, Peter Mueller wrote: > >> first you have to run ntpd in Dom0 and let him sync to some >> timeservers on the web. This ntpd can sync the hardware clock, > > Sure? I think only hwclock can set the host''s RTC.Yes, that''s right. But hwclock is often called on shutdown (if configured) and grabs it''s time from the machine it was started. I''m not really, but 90%, sure thta ntpd can set the hardware clock too. But back to the main problem: For paravitualized DomUs you MUST configure yout ntpd''s the described way. And I think, that full virtualized DomUs can''t access the hardware clock directly too. Please correct me, if i''m wrong. Haven''t setup that much full virtualized Machines. - -- Kind Regards Peter Müller -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org iQEcBAEBAgAGBQJJGV1cAAoJEIZStxVutoo8nosH/1laofoZAUjU5YXE5u1c8amt sLpqFDbo7FP0x3LBs89UOGqPR86Hq3AbxXERBCOBmYjFWUtTcd9ubb+4TzefbGMU m6/HoJuCGDwh83x1+iAYC1/iIN7S8jyEbGb7cw2tdBqQgJ8LvoS3+w+r5gAhn2xc uxjM6FHJ00DWfpx5WjGKTjTCZh6J6ClUl9a2nukWhI4f6Mn1nsJVffjwmx6ZMsnW ypHHK0/5v9KVUMR7+uX5IWmOwLpzqh5RldqF1Z8w0BVXjy+dUfcU1vYaUehdpOiH sdIiUnZ77raThBR1N2sT4THFSSV7wY8URh4kR/eTsxEIvFJoSD8OR/+xobdRbJo=grF5 -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
On Tue, Nov 11, 2008 at 11:24:28AM +0100, Peter Mueller wrote:> >> first you have to run ntpd in Dom0 and let him sync to some > >> timeservers on the web. This ntpd can sync the hardware clock, > > > > Sure? I think only hwclock can set the host''s RTC. > Yes, that''s right. But hwclock is often called on shutdown (if > configured) and grabs it''s time from the machine it was started. I''m > not really, but 90%, sure thta ntpd can set the hardware clock too. > But back to the main problem: For paravitualized DomUs you MUST > configure yout ntpd''s the described way. And I think, that full > virtualized DomUs can''t access the hardware clock directly too. Please > correct me, if i''m wrong. Haven''t setup that much full virtualized > Machines.i''d bet xen keeps virtual hardware clocks for each domU. I''m running time server, part of pool.ntp.org, without any problems. to setup time, just instal ntpd and make sure that /proc/sys/xen/independent_wallclock is set to 1 echo 1 > /proc/sys/xen/independent_wallclock or put this in /etc/sysctl.conf xen.independent_wallclock=1 it might also be possible, that running ntpd on dom0 and setting independent_wallclock to 0 will keep your time accurate, but i''m not sure and i''m too lazy to test it. mk _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
Peter Mueller wrote:> Hi James, > first you have to run ntpd in Dom0 and let him sync to some > timeservers on the web. This ntpd can sync the hardware clock, which > your DomUs are not allowed to do. They have to sync with your Dom0. It > shouldn''t be necessary to install another ntpd in your DomUs. If it''s > not getting better, install ntpd in your DomUs and let him sync to > your Dom0. > > Kind Regards > Peter MuellerHi Peter, OK - I have been running ntpd in Dom0 and it is keeping the time on the Dom0 machine correct. That is certainly not a problem. However, my DomUs do not have the correct time (one of my DomUs had the same time as the Dom0 24 hours ago, but its time is now off by about an hour relative to both the Dom0 and the correct time). I have tried running ntpd on the DomUs in the past and that did not work for me either. One other person who was having the same problem as me, with whom I have corresponded by email, told me she ended up setting up a cron job which did an ntpdate - to reset the time - every 15 minutes. That seems a bit heavy handed, but I suspect that I will end up having to do the same thing. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello James, James Treleaven schrieb:> Peter Mueller wrote: >> Hi James, >> first you have to run ntpd in Dom0 and let him sync to some >> timeservers on the web. This ntpd can sync the hardware clock, which >> your DomUs are not allowed to do. They have to sync with your Dom0. It >> shouldn''t be necessary to install another ntpd in your DomUs. If it''s >> not getting better, install ntpd in your DomUs and let him sync to >> your Dom0. >> >> Kind Regards >> Peter Mueller > > Hi Peter, > > OK - I have been running ntpd in Dom0 and it is keeping the time on the > Dom0 machine correct. That is certainly not a problem. > > However, my DomUs do not have the correct time (one of my DomUs had the > same time as the Dom0 24 hours ago, but its time is now off by about an > hour relative to both the Dom0 and the correct time).Did you set the correct timezone? If it''s almost exact an hour, wrong timezone could be part of the time problem.> I have tried running ntpd on the DomUs in the past and that did not work > for me either. One other person who was having the same problem as me, > with whom I have corresponded by email, told me she ended up setting up > a cron job which did an ntpdate - to reset the time - every 15 minutes. > > That seems a bit heavy handed, but I suspect that I will end up having > to do the same thing.Well, if you don''t need the ntpd in your DomUs as service for the network, ntpdate would be the easiest solution. Many Distributions only use ntpdate or rdate to sync their time to several timeservers in the www. I personally sync to 0/1/2/3.de.pool.ntp.org (take a look into the serverlist of ntp.org to get the correct hosts for your country).> > James- -- Mit freundlichen Grüßen/Kind Regards Peter Müller Servator Support -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org iQEcBAEBAgAGBQJJGr7SAAoJEIZStxVutoo8qFYH/18fHZEnVYCUrTdV/dws1rjr UxE2Cj53B3kp6fZnF/QAAPAvWl79jbeQcicLBnG2pFmF5d5hb7+I0D0uX9vz6yGe DNJBayDMxwU7sriSDF3UZde/cKFU8e0Ux9GeXKWUooxoqrJ87LnWY3OSTUme/mQ9 8HUVFbC9Nv8TH3+ge4LtRgNvjOA4ZUyeni1Ju5K4uDmABpwJrEgvbrgCJBMWjkq8 LkaoLWsHFNrWv64QbkgIQALduAmUJyDjoneZhLTlk8XoiAgocUVCfMaAaIcrq6D/ G+5x6PUJmUld0orBpCuo+O1HIHT7qRDO9GwreV9FzONzXhvOofA51MvAIbd3wEI=YxJk -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
Jordi Espasa Clofent
2008-Nov-17 09:20 UTC
Re: [Xen-users] Re: NTP on fully virtualized domUs
Hi, Info: Debian as dom0 and domUs. My servers are in Barcelona (Spain). After some problems, I''m using the following: * dom0: - ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime - install openntpd and sync against es.pool.ntp.org - reboot * domUs - ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime after the domU creation - reboot Even I have to say the second step is unneeded if you modify the xen-tools creation script (because of they set up localtime as UTC by default, but you can modify it). It''s completely reliable system. -- Thanks, Jordi Espasa Clofent _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users