Keeping up with the time in Xen

January 21, 2008

A simple tip for keeping up with the time in Xen when your domU isn’t syncing the clock frequently enough and your clock is whatever. Of course you can sync your clock with ntpdate but first you need to set the domain (domU) to run its wallclock independently from Xen.

Simply say in the command line of domU:

echo 1 > /proc/sys/xen/independent_wallclock

Or if you have noclobber on:

echo 1 >! /proc/sys/xen/independent_wallclock

To reenable tracking of Xen wallclock:

echo 0 > /proc/sys/xen/independent_wallclock

And to keep the setting between reboots, just add it to the /etc/sysctl.conf:

xen.independent_wallclock = 1

Although, it is better if the Xen dom0 syncs the clock frequently so all the domains (domU) don’t need to do it by themselves and thus wasting resources. Why do things multiple times when it could be done just once.

Advertisements

8 Responses to “Keeping up with the time in Xen”

  1. theolive Says:

    Do you run those commands in domU or in dom0?

  2. Marko Says:

    You set those options in domU. This issue can also be found in XenSource Knowledge Base


  3. […] For more information on this subject look for example here. […]

  4. Marinkina Says:

    Нет,по настоящиму улыбнул 8 пункт,просто представил такую ситуацию ))).

  5. Mark Says:

    > Although, it is better if the Xen dom0 syncs
    > the clock frequently so all the domains
    > (domU) don’t need to do it by themselves

    HHAHAHAAHH – if you try this all your domains will have the wrong time.

    The only option is to set the independent wall clock and run ntpd.

  6. Anonymous Says:

    […] Boardmitteln stellen. Ohne Zugriff auf das Hostsystem, konnte ich mir mit diesem Artikel helfen: https://ruleoftech.wordpress.com/2008…e-time-in-xen/ __________________ You never know, until you try! […]


  7. I actually like what you submit here. Highly insightful and intelligent. One problem though. I’m running Opera with Debian and parts of your current structure pieces are a little wonky. I realize it’s not a regular set up. Yet it’s an issue to keep in mind. I hope that it will help and continue to keep up the top notch quality writing.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: