Home
date: cannot set date: Operation not permitted (OpenVZ) PDF Print E-mail
Written by Tech Druid   
Monday, 16 March 2009 11:49

Upon installation of an OpenVZ container (VE/Virtual Environment) I was unable to set the date, and the time-zone was incorrect.  Attempts to set the date resulted in the following error.

# date 031612482009
date: cannot set date: Operation not permitted

 

To correct this problem, exit from the container (#exit) and issue the following commands.

# vzctl stop <veid>
# vzctl set <veid> --save --capability sys_time:on
# vzctl start <veid>


Where <veid> is your Virtual Environment ID.  Next, log back into your virtual environment and issue the following commands to set the appropriate time-zone for the Virtual Environment (VE).

 

# vzctl enter <veid>
# mv /etc/localtime /etc/localtime.old
# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

 

 

Now you can set the date and time appropraitely.

 

 

 

Sponsors

Banner
 

Friends

Tech Druid

Eco friendly graphic designer in Portland Oregon