[Users] How does the clock work in OpenVZ?

Mike Holloway mikhollo at cisco.com
Fri Mar 9 11:44:20 EST 2007



On Mar 9, 2007, at 4:04 AM, Kirill Korotaev wrote:

> Wolfgang,
>
>> I'm trying to understand whether OpenVZ does anything special about
>> time, and thus whether I need to take care to somehow synchronize the
>> clocks of HN and VEs.
> no. system time is global for the whole node and its VEs.
> By default, VE can not change system time (it requires CAP_SYS_TIME)
>
>> For example, can gettimeofday(2) return
>> different things in the HN and in a VE?
> it can :) but only if different timezones are selected in VEs.
> So you can setup ntpd on the host node and that's all.
>
> Thanks,
> Kirill


Or even better, set up ntpd inside a VE that has CAP_SYS_TIME.

vzctl set 101 --capability sys_time:on --save



-mike



>
>
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://openvz.org/mailman/listinfo/users


More information about the Users mailing list