Quick Contact

Contact our team on
01788 298450
Or use our callback by entering your number here for an instant response
Xen clock not keeping time
Articles & Information - Tips and Tricks

By default, the guest domain (domU) will attempt to use the same clock as the host (dom0). This approach reduces resources where every guest has to manage its own clock and there is no reason for the hosts to have varying experience of time. However, it is common for the time to "jump" forward by a few minutes a day.

Whilst this default behavior is set, it is not possible to set the time of the domain using the standard tools (rdate, ntpdate, clock, hwclock etc) so the time cannot be kept reliably.

To release a Linux guest domain to manage its own time, the kernel setting "independent_wallclock" needs to be set to 1 within the guest domain. You can check the current setting as follows:

cat /proc/sys/xen/independent_wallclock

This can be done from the command line and is effective immediately as follows:

echo 1 > /proc/sys/xen/independent_wallclock

To set the wallclock on boot, add the following to the file: /etc/sysctl.conf:

xen.independent_wallclock = 1

The dom0 can also suffer from the same problem and is fixed in the same way.

 
 
Open Source Software Companies - UK
Opus Vision Limited T/A OpusVL Registered UK number 3905104
We are featured in the FreeIndex Software Development directory