How To Change Timezone in OpenVZ VE Environment

Here is the steps to set the time zone for a particular node in VPS. Login into your NODE/OpenVZ Master Server via SSH and Stop the VE with this command below:

1. Login to the main host node.(SSH).
2. Stop the node(container) which you want to set time.
# vzctl stop 106
106 = Container ID
3.Set the container to have capability to change the time zone.
# vzctl set 106 –capability sys_time:on –save
4. Start the container and login to it.
# vzctl start 106
# vzctl enter 106
5. Change your local timezone.
To find correct time zone location, do this command to search exiting timezones:
# find /usr/share/zoneinfo/ | more
# mv /etc/localtime /etc/localtime_bk
# ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
6. Set the date
# date 050118262011
time has been set to 18.31 on 3rd Oct 2010
(10-Month, 03-Day, 06-Hours, 31-Minutes, 2010 -Year)

Leave a Reply

Your email address will not be published. Required fields are marked *