OpenVZ Forum


Home » General » Support » Time inside container
Re: Time inside container [message #51246 is a reply to message #51042] Fri, 21 March 2014 14:26 Go to previous message
blahugo@yahoo.de is currently offline  blahugo@yahoo.de
Messages: 4
Registered: May 2013
Junior Member
It is possible to run ntpd inside a container an sync the HN.
This is our standad setup.

You'll have to grant the container the capability sys_time.

# vzctl set VEID --capability sys_time:on --save

And configure your ntpd inside the container to sync the hardware clock.
On RHEL-based systems for example:
# /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"

# Set to 'yes' to sync hw clock after successful ntpdate.
SYNC_HWCLOCK=yes

Lookout for your Debian config file.

On RHEL6-based systems this is caused by the compile flag
CONFIG_SECURITY_FILE_CAPABILITIES=y.

Find this on the HN:
grep CAPABILITIES /boot/config-$(uname -r)

Hope this helps.

regards,
blahugo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Container networking broken after upgrade to 2.6.18-308.8.2.el5.028stab101.1, stange kernel errors
Next Topic: Move containers private area to another directory.
Goto Forum:
  


Current Time: Mon Jul 29 07:21:46 GMT 2024

Total time taken to generate the page: 0.02722 seconds