/var/log/syslog 'systemd[1]: Time has been changed' message every 5 seconds
I encountered this issue of systemd[...]Time has been changed
messages logged every five seconds in /var/log/syslog
on a 16.04 server running under Windows 8.1 Hyper-V. To fix it, I disabled time synchronization on the Hyper-V side.
In Hyper-V Manager, I highlighted the VM, selected Settings, then Integration Services, unchecked Time synchronization, and clicked Apply.
The messages stopped instantly - no VM restart was required.
On HyperV/Azure, the message can be disabled by creating a filter for syslog.
create a new file in /etc/rsyslog.d
vi /etc/rsyslog.d/15-excludetime.conf
insert two lines
:msg, contains, "Time has been changed" ~ :msg, contains, "apt-daily.timer: Adding" ~
restart rsyslog
systemctl restart rsyslog.service
Or you can disable the host time sync on VMBUS. I put the line under /etc/rc.local
echo 2dd1ce17-079e-403c-b352-a1921ee207ee > /sys/bus/vmbus/drivers/hv_util/unbind