1

I have Xen virtual machines running on Debian 6 (both Dom0 and DomU). I would like to synchronize clock on DomU with Dom0. On http://wiki.xen.org/wiki/Xen_FAQ_DomU I have read that I need to set /proc/sys/xen/independent_wallclock to 0 but I do not even have /proc/sys/xen directory on DomU:

# ls /proc/sys/xen ls: cannot access /proc/sys/xen: No such file or directory 

What should I do to synchronize clock on DomU with Dom0?

Update:

[ 0.000000] Booting paravirtualized kernel on Xen [ 0.000000] Xen version: 4.0.1 (preserve-AD) (dom0) 
0

2 Answers 2

5

If you are running Xen 3 or earlier, set proc/sys/xen/independent_wallclock to 0 and the clocks should synchronize automatically.
If you are arunning Xen 4+, set tsc_mode=2 in the vm.cfg file for the VM.

Synchronizing automatically can cause problems with some software. Your OS should handle it, though it might complain about time going backward. The most notable problems are ones where time jumping backward causes something in the program to misbehave (it's somewhat rare, but happens).

If you can't run automatic time synchronization for any reason, set independent_wallclock to 1 or tsc_mode to 0 and run NTP. This will still have drifting problems as the clock will be inconsistent (it's the nature of VMs and really can't be "fixed").

1
  • Oy vey, been a long morning. Updated Commented May 22, 2013 at 14:36
1

You run NTP, like the FAQ said.

3
  • The FAQ says I only need to run NTP if virtual machine is HVM but allegedly I can use Xen mechanisms (/proc/sys/xen/independent_wallclock) to sync DomU if DomU is PV. Commented May 22, 2013 at 14:19
  • Is your DomU PV? Commented May 22, 2013 at 14:29
  • My DomU is PV. Nevertheless I decided to run NTP on VM. Thanks! Commented May 22, 2013 at 16:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.