[Lxc-users] NTP in a LXC

Gordon Henderson gordon at drogon.net
Tue Nov 22 12:27:04 UTC 2011


On Tue, 22 Nov 2011, Jeremy MAURO wrote:

> Hi everyone
>
> Is it relevant to setup ntpd on the lxc container?

Probably not..

> And has anyone setup
> a ntp-server on a lxc container?

Yes, but only by accident.

Remember that we only have one kernel here, so I suspect it's a good idea 
to only have one NTP process taking to it to keep it in sync and provide 
NTP services for others (if required)

So what I do is run NTP in the host - then all containers get the time 
synced automatically. Less processes to run, less network, etc.

Unless you're importing an older server into a container on new hardware 
of-course, but even then, it's probably an idea to turn off any other 
services that are no-longer required, if possible. Reduces the overall 
process count which can only be a good thing.

If I had to run NTP in a container (because it's IP address was burnt into 
devices I had no control over - for example) then I'd make sure that was 
the only container on the host server running NTP. I'm really not sure 
what effect that 2 or more NTP processes talking to the kernel has...

Gordon




More information about the lxc-users mailing list