From: <[email protected]>
Zitat von Daniel Bauer <[email protected]>:

From: <[email protected]>
Zitat von Daniel Pittman <[email protected]>:

On Sun, Dec 11, 2011 at 07:09, Daniel Bauer <[email protected]>
wrote:

I've a VPS for my internal LAN, which should also be used as a NTP
server.
The HN has already syncronized the time by de.pool.ntp.org, so the
time is
also ok inside the VPS.
The NTP server inside the VPS stalled, ntpq -p shows:

You don't need NTP inside the container, just on the HN.  The VE
can't
set the time anyhow.

Not really true. You need special capabilities assigned to the VE to
let it manage your system clock. So if you need ntp inside the VE you should do something like "vzctl set <VEID> --capability sys_time:on",
install ntp inside the VE and deinstall it on the HN.

But that's not what I want.

I want the HN to be a NTP client, so that all (HN + VE) have a valid
time.
This works already.

I want the VE to be a NTP server for the local LAN, without beeing a
NTP Client.
That doesn't work.

NTP by default only works as server if it has a valid timesource. By
default it does not use the "local clock" because its unreliable. On
the other hand NTP always try to adjust the local clock if it has a
valid timesource. This does not work in a VE if you don't set the
capability to adjust the clock, NTP will even run as "root" if it is
not able to adjust the local clock with the intended user.

If you insist on your network design your options are:
- Let the VE NTP get the time from the HN and let it run as root on the
VE
- Try to hack NTP use the local clock as timesource and not try to
update

the solution was not to take localhost, but
server 127.127.1.0
fudge 127.127.1.0 stratum 12
now it works.

Thanks a lot
Daniel
_______________________________________________
Users mailing list
[email protected]
https://openvz.org/mailman/listinfo/users

Reply via email to