Using Ubuntu 12.04 VM's built last year on Azure. They only seem to get proper time on boot, and drift about a second a day. Is this a normal issue for Azure VM's? I know VM time drift is normal but thought Linux VM's in Azure (Hyper-V) get regular time sync from the host via integration services.
The OS usually only reads the (emulated) hardware clock upon boot, and then the clock is maintained with an interrupt timer. This is not a perfect time source, of course, and therefore you have to use NTP software to keep it accurate.
Seems others have this issue, even in Windows VM Roles. Once a week is causing too much time drift so I guess manual setting daily or less is indeed in order:
https://stackoverflow.com/questions/6186776/how-to-validate-local-vm-clock-with-ntp-on-windows-azure
This is expected because Hyper-V's clock sync does not necessarily continue to discipline the clock after boot up - see one of the answers on Timesync on HyperV with CentOS 6.2 for details.
Time drift is normal for all computers. You have to use ntpd to keep your time accurate.
As of 2022, most "newer Linux images" use chronyd, which syncs directly from the host.
"Azure is backed by infrastructure running Windows Server 2016. Windows Server 2016 has improved algorithms used to correct time and condition the local clock to synchronize with UTC. The Windows Server 2016 Accurate Time feature greatly improved how the VMICTimeSync service that governs VMs with the host for accurate time. Improvements include more accurate initial time on VM start or VM restore and interrupt latency correction."
"Starting in early calendar 2021, the most current Azure Marketplace images with Linux are being changed to use chronyd as the time sync service, and chronyd is configured to synchronize against the Azure host rather than an external NTP time source. The Azure host time is usually the best time source to synchronize against, as it is maintained very accurately and reliably, and is accessible without the variable network delays inherent in accessing an external NTP time source over the public internet."
Read here: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync