Dear Cloud platform support team and community,
I'm trying to use the ptp_kvm module (the ``KVM virtual PTP driver'') to
synchronize my guest VM's clock to the host clock. This is described in
https://opensource.com/article/17/6/timekeeping-linux-vms under "Host-wide time
synchronization".
However, I'm unable to load the ptp_kvm module. My guest VM is running
CentOS 7.4.1708 with kernel 3.10.0-693.21.1.el7.x86_64:
[root@guestvm ~]# modinfo ptp_kvm
filename:
/lib/modules/3.10.0-693.21.1.el7.x86_64/kernel/drivers/ptp/ptp_kvm.ko.xz
license: GPL
description: PTP clock using KVMCLOCK
author: Marcelo Tosatti <
mtos...@redhat.com>
retpoline: Y
rhelversion: 7.4
srcversion: A2A146848B24DA435A9360C
depends: ptp
intree: Y
vermagic: 3.10.0-693.21.1.el7.x86_64 SMP mod_unload modversions
signer: CentOS Linux kernel signing key
sig_key: 03:DA:60:92:F6:71:13:21:B5:AC:E1:2E:84:5D:A9:73:36:F7:67:4D
sig_hashalgo: sha256
[root@guestvm ~]# lsmod | grep ptp
ptp 19231 0
pps_core 19057 1 ptp
[root@guestvm ~]# modprobe ptp_kvm
modprobe: ERROR: could not insert 'ptp_kvm': No such device
[root@guestvm ~]# ls /dev/ptp*
ls: cannot access /dev/ptp*: No such file or directory
When I run a Centos 7.4 guest VM on my own Centos 7 host (own Cloud), the
ptp_kvm module loads and chrony uses kvm's ptp device for time synchronization.
The guest VM's clock is within 103 ns of the host clock (see the line
prefixed "#*
PHC0) below.
[root@internal3 ~]# chronyc sources -v
210 Number of sources = 4
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0 0 3 377 9 +39ns[ +103ns] +/- 2ns
^- internal0 2 6 377 17 +378us[ +378us] +/- 26ms
^- internal1 2 6 377 8 -283us[ -283us] +/- 27ms
^- internal2 2 6 377 13 -222us[ -222us] +/- 27ms
Has anybody succeeded using the ptp_kvm module on the GCE?
Or is there any requirement that I missed?
Thank you!
With best regards,
Shinhyung Yang