You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
ECS instance local time synchronization
Configuring NTP service for Windows instances
Copy page
Download PDF
Configuring NTP service for Windows instances
This topic describes how to use the NTP service to synchronize the local time of Windows instances. In the example provided in this topic, Windows Server 2019 Datacenter Edition 64 bit is used.​
What is NTP?​
Network Time Protocol (NTP) is an application-layer protocol in the TCP/IP protocol suite, designed for clock synchronization between clients and servers and providing highly accurate time calibration.​
Procedure​
You can enable and configure the NTP service by using either the Graphical User Interface (GUI) or the command line.​
​
GUI-based configuration
Command line-based configuration
​
Step 1: Enable the NTP service​
By default, the Windows Time service is enabled in the Windows Server operating system. To ensure that time synchronization works as expected after the NTP service is configured, you need to enable the NTP service in the instance. Perform the following steps to check and enable the NTP service:​
  1. Log in to the Windows instance. For more information, refer to Logging in to Windows instances.​
  1. Click the Windows Start icon, click "Windows System", and then click "Run". In the Run window, execute the services.msc command.​
  1. In the "Services" window, locate and double-click "Windows Time".​
  1. In the "Windows Time Properties (Local Computer)" window, select the "General" tab and modify the following settings:​
  1. Set "Start type" to "Automatic".​
  1. Make sure that the value of "Service status" is "Running". Otherwise, click the “Start” button to start the Windows Time service.​
  1. After you click the "Apply" button, click the "OK" button to enable the NTP service.​
Step 2: Modify the default NTP server address​
By default, the Microsoft NTP server (time.windows.com) is configured for the Windows Server operating system. You can change the default NTP server to the NTP server you want to use.​
  1. Log in to the Windows instance. For more information, refer to Logging in to Windows instances.​
  1. In the notification area of the taskbar, click the date and time, and then click the "Change date and time settings" button.​
  1. In the "Related settings" section of the "Date & time" window, click the "Add clocks for different time zones" button.​
  1. In the newly opened "Date and Time" window, click the "Internet Time" tab, and then click the "Change settings" button.​
  1. In the "Internet Time Settings" window, select the "Synchronize with an Internet time server" option, and enter the NTP server address you want to use in the "Server" text box.​
Volcano Engine provides NTP servers. For more information, see List of Volcano Engine NTP server addresses.​
  1. Click the "Update now" button. Windows immediately synchronizes time with the NTP server.​
  1. Click the "OK" button to complete the modification of the NTP server address.​
Step 3: Modify the time synchronization interval for the NTP service (optional)​
The default time synchronization interval is 400 (in hexadecimal, equivalent to 1024 seconds, or approximately 17 minutes). You can specify a custom time synchronization interval for the NTP service based on your needs. Perform the following steps to modify the time synchronization interval:​
  1. Connect to the Windows instance. For more information, see Logging in to Windows instances.​
  1. Click the Windows Start icon, click "Windows System", and then click "Run". In the Run window, execute the regedit command.​
  1. In the left directory tree of the "Registry Editor" window, select "HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > W32Time > TimeProviders > NtpClient".​
  1. In the "Name" column of the details window on the right, double-click "SpecialPollInterval".​
  1. In the "Edit DWORD (32-bit) Value" window, set "Base" to "Decimal" and enter a value in the "Value data" field based on your needs. The value you enter is the synchronization interval you need, in seconds.​
  1. Click the "OK" button to complete the modification operation.​
  1. After you complete the modification, you need to restart the instance or the service for the configuration to take effect. If you do not want to restart the instance due to your business requirements, you can perform the following steps to restart the service for the modification to take effect.​
  1. Click the Windows Start icon, click "Windows System", and then click "Run". In the Run window, execute the services.msc command.​
  1. In the "Services" window, locate and right-click "Windows Time".​
  1. Click the "Restart" button to restart the service.​
​
FAQ​
What do I do if the modification fails to take effect after I change the default NTP server address to the Volcano Engine address and restart the Windows Time service?​
This failure may be caused by conflicts between different registry configurations when you configure the NTP server. Refer to the following steps to cancel the Windows Time configuration in the local group policy.​
  1. Execute the following command in the elevated command prompt to reconfigure the NTP server address.​
  • ​
    w32tm /config /manualpeerlist:"ntp0.ivolces.com,0x9 ntp1.ivolces.com,0x9 ntp2.ivolces.com,0x9 ntp3.ivolces.com,0x9" /syncfromflags:manual /reliable:yes /update​
    ​
  1. Click the Windows Start icon, click "Windows System", and then click "Run". In the Run window, execute the following command to open the Local Group Policy Editor.​
  • ​
    gpedit.msc​
    ​
  1. Double-click "Configure Windows NTP Client", and in the pop-up window, select Not Configured.​
  1. Click the "Apply" button, and then click the "OK" button to complete the operation.​
tip​
After you modify the configuration, the "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time" registry key automatically disappears.​
  1. Execute the following commands in the Command Prompt window to restart the time service and resynchronize the time.​
  • ​
    net stop w32time​
    net start w32time​
    w32tm /resync​
    ​
  1. Execute the following command in the Command Prompt window to verify whether time synchronization can be performed as expected.​
  • ​
    w32tm /query /status​
    ​
​
Last updated: 2026.06.17 19:32:52