Friday, March 22, 2013

How to set the time zone for openvz nodes.


The following post describes how to set the time zone for openvz nodes, Make sure that the HW node timezone is correct Else, use this command to update the time zone on the HW node
rdate -p rdate.cpanel.net
rdate -s rdate.cpanel.net

-p Print the time returned by the remote machine. -s Set the system time to the returned time. On the sub node, run
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/{desired-timezone} /etc/localtime
date MMDDHHMiMiYYYY

If you want to set the time in a OpenVZ sub node automatically, execute the following command on the HW node:
vzctl set 501 --capability sys_time:on --save
vzctl restart 501 501 = container id
date (to check the time)

That’s it.
Set the time zone for openvz nodes.

No comments:

Post a Comment