experiencing time synchronization issues on two Azure Linux virtual machines running Ubuntu 24.04 LTS.

Balachander 0 Reputation points
2026-11-27T11:09:18.1733333+00:00

We are experiencing time synchronization issues on two Azure Linux virtual machines running Ubuntu 24.04 LTS.

The VM system clocks show discrepancies between servers, and the operating system reports that the system clock is not synchronized even though systemd-timesyncd is active.

The VMs are currently configured to use Ubuntu public NTP sources. However, they are unable to receive responses from the configured external NTP endpoints over UDP port 123.

We do not maintain an internal/dedicated NTP server and would like to evaluate the Azure host PTP clock as the production time source.

We request the Azure Compute/Linux team to validate the following:

  1. Please confirm whether Azure Hyper-V PTP through /dev/ptp_hyperv is fully supported on Azure VMs running Ubuntu 24.04 LTS and can be used as the primary time source instead of public NTP.
  2. Please validate from the Azure platform/host side whether the Hyper-V PTP clock presented to both affected VMs is healthy and synchronized accurately with the Azure host time source.
  3. Please provide or confirm the recommended production Chrony configuration for Ubuntu 24.04 using /dev/ptp_hyperv.
  4. Please confirm all prerequisites for this configuration, including:
    • Required Linux kernel version
      • Required Hyper-V/Linux Integration Services modules
        • Supported Azure VM generation or VM-size requirements, if any
          • Required PTP device/udev configuration
            • Recommended Chrony configuration
              • Whether systemd-timesyncd should be disabled when Chrony is managing the Azure PTP source
              1. Please confirm Microsoft's recommended production architecture when Internet-based NTP over UDP/123 is unavailable and no customer-managed NTP infrastructure exists.

Current observations

  • OS: Ubuntu 24.04 LTS
  • Platform: Azure Virtual Machines
  • Current time source: Ubuntu/public NTP
  • NTP connectivity: No response from configured external NTP sources over UDP/123
  • systemd-timesyncd: Active
  • OS synchronization state: Not synchronized
  • Internal customer-managed NTP server: Not available

We would also appreciate confirmation that using Azure host time through Hyper-V PTP is considered a supported Azure-native configuration for these VMs before we implement the change in production.We request the Azure Compute/Linux team to validate the following:

  1. Please confirm whether Azure Hyper-V PTP through /dev/ptp_hyperv is fully supported on Azure VMs running Ubuntu 24.04 LTS and can be used as the primary time source instead of public NTP.
  2. Please validate from the Azure platform/host side whether the Hyper-V PTP clock presented to both affected VMs is healthy and synchronized accurately with the Azure host time source.
  3. Please provide or confirm the recommended production Chrony configuration for Ubuntu 24.04 using /dev/ptp_hyperv.
  4. Please confirm all prerequisites for this configuration, including:
    • Required Linux kernel version
      • Required Hyper-V/Linux Integration Services modules
        • Supported Azure VM generation or VM-size requirements, if any
          • Required PTP device/udev configuration
            • Recommended Chrony configuration
              • Whether systemd-timesyncd should be disabled when Chrony is managing the Azure PTP source
              1. Please confirm Microsoft's recommended production architecture when Internet-based NTP over UDP/123 is unavailable and no customer-managed NTP infrastructure exists.

Current observations

  • OS: Ubuntu 24.04 LTS
  • Platform: Azure Virtual Machines
  • Current time source: Ubuntu/public NTP
  • NTP connectivity: No response from configured external NTP sources over UDP/123
  • systemd-timesyncd: Active
  • OS synchronization state: Not synchronized
  • Internal customer-managed NTP server: Not available

We would also appreciate confirmation that using Azure host time through Hyper-V PTP is considered a supported Azure-native configuration for these VMs before we implement the change in production.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-11-27T11:10:27.2933333+00:00

    Configure Chrony to use /dev/ptp_hyperv as the primary source; Azure documents the host PTP clock as an Azure-native time source and describes Azure host time as usually the best source for Linux VMs when external NTP is unavailable.^1^

    Support and prerequisites

    For each VM, verify:

    1. Kernel support Azure host PTP requires Linux kernel 4.11 or later. Ubuntu 24.04 normally exceeds this requirement, but confirm the running kernel:
         uname -r
      
    2. Hyper-V integration service
         sudo lsmod | grep hv_utils
      
      The output should contain hv_utils and normally hv_vmbus. VMICTimeSync, provided through Linux Integration Services, exposes the Azure host clock as a PTP device.^1^
    3. Host PTP device
         ls -l /sys/class/ptp
         for p in /sys/class/ptp/ptp*; do
             printf '%s: ' "$p"
             cat "$p/clock_name"
         done
         ls -l /dev/ptp_hyperv
      
      At least one clock_name must return hyperv. Use /dev/ptp_hyperv, not a fixed /dev/ptp0, because Accelerated Networking drivers can create additional PTP devices and numbering can change after reboot.
    4. VM generation and size The Azure Linux time-sync documentation applies broadly to Linux VMs and does not specify a Generation 1/Generation 2 or VM-size restriction. Operationally, support is determined by whether the running kernel and hv_utils expose a PTP device whose clock name is hyperv. The available documentation is insufficient to certify every individual SKU without those guest-side results.

    Ubuntu 24.04 is also an endorsed Azure platform-image release when deployed from Canonical’s supported Azure Marketplace offering.^2^

    Production Chrony configuration

    Install Chrony if it is not already present, then add the following to Ubuntu’s Chrony configuration, normally /etc/chrony/chrony.conf:

    refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0 stratum 2
    makestep 1.0 -1
    

    The refclock directive is Microsoft’s documented Azure host-clock configuration. Because the host does not automatically convey stratum information to the guest, it explicitly treats host time as stratum 2; the VM consequently reports itself as stratum 3.^1^

    Apply the configuration:

    sudo systemctl enable --now chrony
    sudo systemctl restart chrony
    sudo systemctl disable --now systemd-timesyncd
    chronyc tracking
    chronyc sources -v
    timedatectl status
    

    Expected results:

    • chrony is active.
    • chronyc sources -v shows the PHC reference clock as selected.
    • chronyc tracking reports a synchronized reference.
    • timedatectl status eventually reports System clock synchronized: yes.

    Disable systemd-timesyncd when Chrony owns synchronization to avoid two time services competing or generating misleading external-NTP messages. Azure notes that Chrony normally becomes the default once started, but explicitly documents disabling systemd-timesyncd when it continues trying to synchronize.

    If /dev/ptp_hyperv is missing

    Only if a PTP device reports hyperv but the stable symlink is absent, create the documented udev rule:

    sudo tee /etc/udev/rules.d/99-ptp_hyperv.rules >/dev/null <<'EOF'
    ACTION!="add", GOTO="ptp_hyperv"
    SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK += "ptp_hyperv"
    LABEL="ptp_hyperv"
    EOF
    
    sudo udevadm control --reload
    sudo udevadm trigger --subsystem-match=ptp --action=add
    

    Then verify ls -l /dev/ptp_hyperv. Newer systemd releases generally already include this behavior, so do not add the rule unless the symlink is actually missing.^1^

    If no PTP entry reports hyperv, collect uname -r, lsmod, /sys/class/ptp/*/clock_name, dmesg, and the VM image/SKU details before changing Chrony.

    Azure host-side validation

    Guest commands can prove that the host clock is exposed and that Chrony is tracking it, but they cannot validate the underlying compute host’s synchronization state. For Microsoft to examine both VMs’ host-side PTP presentation, create an Azure support request under Help + support → Create a support request, select the affected VMs, provide the timestamps of observed drift, and allow advanced diagnostic collection if permitted.^3^

    Include before-and-after output from:

    uname -r
    lsmod | grep hv_utils
    find /sys/class/ptp -name clock_name -exec sh -c 'echo -n "$1: "; cat "$1"' _ {} \;
    chronyc tracking
    chronyc sources -v
    timedatectl status
    

    This is the appropriate escalation route for confirming whether each underlying Azure host clock is healthy and accurately synchronized.


    References

    1. Time sync for Linux VMs in Azure
    2. Endorsed Linux distributions on Azure
    3. Create an Azure support request
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.