NTP servers for Azure cloud

Mostafa 20 Reputation points
2024-09-06T09:59:27.5133333+00:00

Is there please an internal NTP serrver used for Azure cloud that can be set on VMs

Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,792 questions
{count} votes

Accepted answer
  1. deherman-MSFT 36,836 Reputation points Microsoft Employee
    2024-09-10T18:18:52.1233333+00:00

    @Mostafa

    I launched the official RHEL 8.8 image and confirmed the configuration. You can update yours as necessary to match or utilize the PTP configuration

    Default chrony.conf:

    enter image description here

    If you want to utilize PTP follow the steps below:

    Confirm you have ptp hyperlink setup:

    [root@dehermanrhel azureuser]# ls -l /dev/ptp_hyperv
    
    lrwxrwxrwx. 1 root root 4 Sep 10 17:38 /dev/ptp_hyperv -> ptp0
    
    

    If not, add the udev rule and reload:

    $ sudo cat > /etc/udev/rules.d/99-ptp_hyperv.rules << 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
    

    Once this is setup you can configure /etc/chrony.conf and add these lines:

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

    More details can be found on the RHEL documentation Configuring NTP Using the chrony Suite.Hope this helps! Let me know if you still have questions.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. deherman-MSFT 36,836 Reputation points Microsoft Employee
    2024-09-06T16:01:53.1466667+00:00

    @Mostafa

    If your Windows VM is configured for NTP it utilizes time.windows.com by default. If you are using a Linux VM the NTP server will vary depending on the OS, such as ntp.ubuntu.com. That being said, there are multiple configuration options to consider. You can review the details on Time sync for Linux VMs in Azure and Time sync for Windows VMs in Azure.

    Let me know if that helps or you have any questions regarding the configuration.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

Your answer

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