November 12, 2012

Xen DomU clock issues

Xen DomU guests can exhibit strange issues with clock skew (I didn’t have this problem until I started running Debian in PV mode). The issue seems to occur when you set the VM clock to be using jiffies. In my case, the clock was running anywhere from 1.5-2X the normal clock speed causing all kinds of odd behavior from inaccurate load calculation to issues with SSL certificates and chef working properly. The fix was to set the time source to ‘xen’ rather than ‘jiffies’.

Set Xen DomU guest time source

echo xen > /sys/devices/system/clocksource/clocksource0/current_clocksource