How to set/change timezone in openvz base VM?

Started by Dipak Bhoi, August 03, 2015, 03:02:18 PM

Previous topic - Next topic

Dipak Bhoi

Hello folks,

Yes, you can set/change different timezone in OpenVZ based VM. Please follow the instructions and run below commands.

Login to the host node via ssh.

Stop the VM(container) on which you want to set time.

Quote# vzctl stop 151

Set the container to have capability to change the time zone.

Quote# vzctl set 151 --capability sys_time:on --save

Start the VM and login to it.

Quote# vzctl start 151
# vzctl enter 151

Set/Change your local timezone with below commands.

Quote# mv /etc/localtime /etc/localtime.old
# ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime


Set the date and time.

Quote# date 080303002015


That's All, Enjoy...!!!!!
MilesWeb - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India
Grab a Free SSL for your website.  WordPress Optimized Solution.