On Tue, Oct 01, 2019 at 05:48:41AM +0200, Hans-Heinrich Hansen wrote: > are there any ideas how LinuxPTP could be used in virtual machines? > > It would be sufficient to be able to use the exact time generated by PTP, > e.g. with LinuxPTP running on the host system.
On the VM host, simply run ptp4l, ntpd, or chrony etc, as normal. On the VM guest, enable PTP_1588_CLOCK_KVM (since 4.11), or use Microsoft Hyper-V guest support (also 4.11+) in a Windows host. A PHC device representing the host clock will appear in the guest. Then, for example: To configure Chronyd to use PHC refclock, add the following line to its configuration file: refclock PHC /dev/ptpX poll 3 dpoll -2 offset 0 Where /dev/ptpX is the kvmclock PTP clock. (I have never used this myself, but it is supposed to work!) HTH, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel