OpenVZ : Unable to set capacity on running container

By | December 10, 2011

Got this error trying to adjust time on a VPS from the host node?

[root@server ~]# vzctl set 111 --capability sys_timen --save
Unable to set capability on running container
WARNING: Some of the parameters could not be applied to a running container.
Please consider using --setmode option

There is two possible solutions :

1. Stop the VPS and use the following command and start the VPS :

vzctl set 111 --capability sys_timen --save

2. Use this command and the the parameter will be enabled next time the VPS will be rebooted :

vzctl set 111 --capability sys_timen --setmode restart --save

* Be careful with option 2 – VPS reboot itself in some occasion using this command!