[Lxc-users] reading hwclock from container

Zhu Yanhai zhu.yanhai at gmail.com
Sun Dec 18 09:22:48 UTC 2011


2011/12/18 DTK <gruessle at gmail.com>:
> I am trying to avoid having to install NTP in every container, so I
> came up with following idea.
>
> Main server cron job
>
>        * 0 *  * * /sbin/hwclock -w
>
> Each container has following cron job
>
>        10 0 *  * * /sbin/hwclock -s
>
> However, the container can't access /dev/rtc and I am guessing that
> has something to do with my cgroup config line:
>
>       lxc.cgroup.devices.allow = c 254:0 rwm # rtc
>
> Anyway I can fix this? Or get the same result some other way?
>
> ------------------------------------------------------------------------------
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users

IMHO if you just want to keep reading the same time on all the guests,
then you need to do nothing to achieve this, it's already there. Since
you are using one single setup of kernel and hardware. Running ntpd on
the guests is unnecessary.

--
Thanks,
Zhu Yanhai




More information about the lxc-users mailing list