How to correct timezones in Openvz and virtuozzo nodes
Wednesday, November 7, 2012 2:43:55 PM Asia/Calcutta
The
following post describes on how to set your timezone in openvz nodes.
First we need to check the if the hardware node has the correct
time/date. Else please use below commands to update the timezone on the
HW node
-p Print the time returned by the remote machine.
-s Set the system time to the returned time
Now on the subnode run the below commands
Use the command date to verify its working.
If you want to set the time in an OpenVZ sub node from main node, execute the following command 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
Now on the subnode run the below commands
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/{desired-timezone} /etc/localtime
Use the command date to verify its working.
If you want to set the time in an OpenVZ sub node from main node, execute the following command on the HW node:
vzctl set VZID --capability sys_time:on --save
vzctl restart VZID
vzctl enter VEID
date (to check the time)
No comments:
Post a Comment