FULL AI ANALYSIS

Ubuntu VMs jump 60–120 seconds ahead after live migration; systemd‑timesyncd reports large step adjustments

Generated Oct 3, 2026, 12:35:03 AM

Analysis summary

Live migration can introduce discontinuities between the guest's virtual clock sources (kvmclock, paravirtualized timers) and the host timebase. systemd‑timesyncd is conservative about correcting monotonic time but will step the system clock when the measured offset exceeds its threshold; this often happens after migration because the guest's time source is reset or the host reports a slightly advanced time. Installing a proper NTP client like chrony inside the guest avoids abrupt steps because chrony can slewrate large offsets gradually or step only when safe. The underlying cause is time source handover during live migration combined with systemd‑timesyncd's step policy.

Possible causes

Guest lacks a robust time sync daemon (chrony/ntpd) that tolerates live migration

95%

systemd‑timesyncd's default step threshold triggers an immediate clock step after measuring migration offset

90%

Paravirtual clock (kvmclock) and host clocks slightly out of sync at migration boundary causing guest clock delta

80%

Hypervisor not using consistent timekeeping options across hosts (e.g., different chrony configurations or CPU frequency scaling effects)

30%

Suggested fixes

1

Diagnostic step 1

For immediate mitigation, stop systemd‑timesyncd on problematic guests and install and configure chrony to manage time inside the guest; chrony handles slewing and large offsets more gracefully in virtualized environments.

2

Diagnostic step 2

If cron job timing is critical, configure cron to use monotonic timers where possible or add guard logic to avoid double execution after migrations.

3

Diagnostic step 3

Collect vm and host journal entries around migration times, and compare /proc/driver/rtc and dmesg before and after migration to see which time sources changed; preserve logs for virtualization/admin escalation if necessary.

4

Diagnostic step 4

Coordinate with virtualization administrators to ensure all hosts have tight chrony synchronization and consistent KVM/QEMU timekeeping settings; avoid mixing hosts with large clock offsets.

5

Diagnostic step 5

If you must continue using systemd‑timesyncd, lower its StepIntervalSec or increase the StepThresholdToSlew parameter (documented in timesyncd.conf) to prefer slewing over stepping — test on a non‑production VM first.