Re: Time inside container [message #51246 is a reply to message #51042] |
Fri, 21 March 2014 14:26 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
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
|
|
|