Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic Cloud Server/ FAQs/ Network Configuration/ Does Huawei Cloud Provide the NTP Server and How Can I Configure It?

Does Huawei Cloud Provide the NTP Server and How Can I Configure It?

Updated on 2025-01-10 GMT+08:00

Yes. Huawei Cloud provides the NTP server, and you can use it only on the ECSs you have purchased on the Huawei Cloud management console.

You can use the Huawei-provided NTP server or other NTP servers. The configuration procedures are the same. This section describes how to configure the Huawei-provided NTP server on an ECS.

NOTE:

ECSs created using x86 public images use chronyd for time synchronization by default. You do not need to configure the NTP server.

Background

If you use the NTP server provided by Huawei Cloud, you also need to use the DNS server. Table 1 lists the NTP servers provided by Huawei Cloud in different regions.

For details about how to obtain the DNS server address, see What Are Huawei Cloud Private DNS Server Addresses?

Table 1 NTP servers

Region

NTP Server IP Address

CN North

ntp.myhuaweicloud.com

CN East

ntp.myhuaweicloud.com

CN South

ntp.myhuaweicloud.com

CN Southwest

ntp.myhuaweicloud.com

CN-Hong Kong

ntp.myhuaweicloud.com

AP-Bangkok

ntp.myhuaweicloud.com

AP-Singapore

ntp.myhuaweicloud.com

AP-Jakarta

ntp.myhuaweicloud.com

AP-Manila

ntp.myhuaweicloud.com

ME-Riyadh

ntp.myhuaweicloud.com

AF-Cairo

ntp.myhuaweicloud.com

AF-Johannesburg

ntp.myhuaweicloud.com

Istanbul (Türkiye)

ntp.myhuaweicloud.com

LA-Mexico City1

ntp.myhuaweicloud.com

LA-Mexico City2

ntp.myhuaweicloud.com

LA-Sao Paulo1

ntp.myhuaweicloud.com

LA-Santiago

ntp.myhuaweicloud.com

Linux (chronyd)

The following section uses CentOS 7.3 as an example.

  1. Check whether the IP address of the DNS server is correct on the ECS.

    1. Log in to the Linux ECS.
    2. Run the following command to open the resolv.conf file:

      vi /etc/resolv.conf

    3. Check whether the nameserver value in the file is the same as the IP address of the DNS server provided in What Are Huawei Cloud Private DNS Server Addresses?
      • If yes, go to step 3.
      • If no, go to step 2.

  2. (Optional) Configure the DNS server for the ECS.

    1. Log in to the Linux ECS.
    2. Run the following command to edit the resolv.conf configuration file:

      vi /etc/resolv.conf

    3. Add the following statement to configure the DNS server:

      nameserver IP address of the DNS server

      Example:

      Consider the CN North region as an example. Add the following statement:

      nameserver 100.125.1.250

  3. Configure the NTP server for the ECS.

    1. Log in to the Linux ECS.
    2. Run the following commands to stop the chronyd process:

      systemctl stop chronyd

      systemctl disable chronyd

    3. Run the following command to edit the chrony.conf configuration file:

      vim /etc/chrony.conf

    4. Add the following statement to configure the NTP server:

      server Domain name of the NTP server minpoll 4 maxpoll 10 iburst

      Example:

      server ntp.myhuaweicloud.com minpoll 4 maxpoll 10 iburst

    5. Run the following command to start the service upon system restart:

      For Euler and CentOS:

      systemctl restart chronyd

      For SUSE:

      service chronyd restart

      NOTE:

      Run the required command based on the OS running on the ECS.

      If the message "Failed to restart chronyd.service: Unit not found." is displayed, run the yum -y install chrony command.

    6. Run the following command to check whether the time on the NTP server has been synchronized with that on the upper-layer NTP server:

      chronyc sources -v

      If "*" is displayed, the time has been synchronized.

      Figure 1 Modification result
      NOTE:

      It takes several minutes to perform NTP time synchronization for the first time.

    7. Set the automatic startup of the chronyd service.

      For Euler and CentOS:

      systemctl enable chronyd

      For SUSE:

      chkconfig chronyd on

Linux (ntpd)

The following section uses CentOS 7.3 as an example.

  1. Check whether the IP address of the DNS server is correct on the ECS.

    1. Log in to the Linux ECS.
    2. Run the following command to open the resolv.conf file:

      vi /etc/resolv.conf

    3. Check whether the nameserver value in the file is the same as the IP address of the DNS server provided in What Are Huawei Cloud Private DNS Server Addresses?
      • If yes, go to 3.
      • If no, go to 2.

  2. (Optional) Configure the DNS server for the ECS.

    1. Log in to the Linux ECS.
    2. Run the following command to edit the resolv.conf configuration file:

      vi /etc/resolv.conf

    3. Add the following statement to configure the DNS server:

      nameserver IP address of the DNS server

      Example:

      Consider the CN North region as an example. Add the following statement:

      nameserver 100.125.1.250

  3. Configure the NTP server for the ECS.

    1. Log in to the Linux ECS.
    2. Run the following commands to stop the chronyd process:

      systemctl stop chronyd

      systemctl disable chronyd

    3. Run the following command to edit the ntp.conf configuration file:

      vim /etc/ntp.conf

    4. Add the following statement to configure the NTP server:

      server Domain name of the NTP server

      Example:

      server ntp.myhuaweicloud.com

    5. Run the following command to start the NTP service upon system restart:

      For Euler and CentOS:

      systemctl restart ntpd

      For SUSE:

      service ntpd restart

      NOTE:

      Run the required command based on the OS running on the ECS.

      If the message "Failed to restart ntpd.service: Unit not found." is displayed, run the yum -y install ntp command.

    6. Run the following command to check whether the time on the NTP server has been synchronized with that on the upper-layer NTP server:

      ntpq -p

      If "*" is displayed, the time has been synchronized.

      NOTE:

      It takes several minutes to perform NTP time synchronization for the first time.

    7. Set the automatic startup of the NTP service.

      For Euler and CentOS:

      chkconfig ntpd on

      For SUSE:

      chkconfig ntpd on

Windows

Take an ECS running Windows Server 2012 as an example.

  1. Log in to the Windows ECS as user Administrator.
  2. Enable the local area connection.

    1. In the lower right corner of the taskbar, right-click the network connection icon.
    2. Click Open Network and Sharing Center.
      Figure 2 Open Network and Sharing Center
    3. In the navigation pane on the left, click Change adapter settings.

  3. Configure the DNS server for the ECS.

    1. Double-click network connections.
    2. Click Properties in the lower left corner, as shown in Figure 3.
      Figure 3 Local area connection
    3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties, as shown in Figure 4.
      Figure 4 Selecting a protocol type
    4. Select Use the following DNS server addresses and set the IP addresses of the DNS servers as prompted, as shown in Figure 5.
      Figure 5 Setting the IP addresses of the DNS servers

  4. Configure the NTP server for the ECS.

    1. Start the Run dialog box. Enter regedit and click OK.
    2. Modify the registry entries.
      • In HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > W32Time > TimeProviders > NtpClient, set the value of Enabled to 1, indicating that the NTP client is used.
      • In HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > W32Time > TimeProviders > NtpServer, set the value of Enabled to 0, indicating that the NTP server is stopped.
      • Choose the HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > W32Time > Parameters file and set the NtpServer data. For example, set its data to ntp.myhuaweicloud.com. Set the data of TYPE to NTP.
      • In HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ TimeProviders \ NtpClient, set the value of SpecialPollInterval to 60 and that of Base to Decimal, indicating the clock synchronization cycle is 60s.
      • In HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ config, set the values of MaxPosPhaseCorrection and MaxNegPhaseCorrection to ffffffff and that of Base to Hexadecimal.
    3. Open the Run dialog box, enter services.msc, and click OK. The Services window is displayed.
    4. View the service named Windows Time and set the Start Type to Automatic to synchronize time from the NTP server.
    5. Open the Run dialog box and run the following commands in sequence to restart the Windows Time service:

      net stop w32time

      net start w32time

    6. Manually change the time on the client to make it different from that on the NTP server. One minute later, check whether the time on the client is the same as that on the NTP server. If yes, the time is synchronized.

Follow-up Procedure

After the ECS is restarted, the DNS configuration is reset, and its IP address is changed to the IP address of the DNS server in the VPC subnet. Therefore, before restarting the ECS, check whether the DNS configuration in the VPC subnet is the same as the target DNS configuration. If they are different, modify the DNS configuration in the VPC subnet. For details, see Modifying a Subnet.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback