What Do I Do If the Source Server's Clocks Are Not Synchronized to the Target Server?
Symptom
Solution
From CentOS 6, CentOS 7, CentOS 8, and Ubuntu, you can configure the Huawei Cloud image source and NTP server to resolve this time inconsistency problem.
- Start the target server.
- Log in to the target server as user root, go to the directory where SMS-Agent is installed, and run the following command:
./ntp_set.sh
If the SMS-Agent is installed in the /tmp directory, the SMS-Agent directory will be deleted from the target server after the migration. You can download and install the SMS-Agent again on the target server.
- Determine whether to configure the Huawei Cloud image source (Yum repository for CentOS and APT repository for Ubuntu) and NTP server. y indicates yes, and n indicates no.
- To configure the Huawei Cloud image source, enter y and Perform the operations described in How Do I Configure the Yum Repository After the Migration?
For CentOS, run the following command to check whether the image source address has been changed to that of the Huawei Cloud Yum repository.
vim /etc/yum.repos.d/CentOS-Base.repo
For Ubuntu, run the following command to check whether the image source address has been changed to that of the Huawei Cloud APT repository.vim /etc/apt/sources.list
- To configure the Huawei Cloud NTP server, enter y, enter the domain name of the Huawei Cloud NTP server (ntp.myhuaweicloud.com), and press Enter. If the following information is displayed, the NTP server is configured successfully.
Then check whether the IP address of the NTP server has been changed to that of the Huawei Cloud NTP server.
ntpq -p
- To configure the Huawei Cloud image source, enter y and Perform the operations described in How Do I Configure the Yum Repository After the Migration?
- Run the date and hwclock commands to check whether the system time and hardware time on the target server have been synchronized with the source server.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.