Sample Header Ad - 728x90

Keep system clock synchronized to hardware clock

3 votes
1 answer
2089 views
The situation: - We have some Linux VMs running compute jobs. - The VMs do not have Internet access (including NTP). - The hypervisor does know the correct time. - The hypervisor's time is exposed to the VM via its hardware clock. - The hypervisor seems to be QEMU/KVM-based. We do not control the hypervisor (it is a cloud VPS offering). The problem: - The VMs' system clock drifts away from the correct time / hardware clock. The question: - Is it possible to keep the system clock synchronized to the hardware clock at all times? - Alternatively, is it possible to tell e.g. ntpd to account for system clock drift, using the hardware clock as reference? What I tried: - A 0 * * * * hwclock --hctosys cronjob, however, the drift is significant enough that even hourly synchronization is insufficient, and increasing the cronjob frequency seems like a workaround at this point.
Asked by Vladimir Panteleev (1871 rep)
Apr 7, 2022, 04:34 PM
Last activity: Feb 4, 2025, 01:07 PM