The solution to the failure to modify or synchronize the time under the Xen virtual machine

Xen virtual machine does not allow different virtual machines to use different system time by default, so the system time of all virtual machines will be strictly synchronized with the system time of the host machine. Although the date command is used to modify the system time of the virtual machine, although the system time is successful, the system time is still not Change. If there is a special need to independently modify the Xen virtual machine, you can do it in the following ways:

 

1. Turn off the time synchronization between the virtual machine and the host

echo xen.independent_wallclock=1 >>/etc/sysctl.conf

 

2. Refresh to take effect immediately

sysctl -p

 

3. Set the time to synchronize automatically

ntpdate asia.pool.ntp.org

 

4. Set up scheduled tasks to execute at regular intervals

crontab -u root -e

* * */5 * * ntpdate asia.pool.ntp.org

/etc/init.d/crond restart

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326919098&siteId=291194637