Changing System Time From ContainerNormally it is impossible to change the system time from a Container. Otherwise, different Containers could interfere with each other and could even break applications depending on the system time accuracy.
Normally only the server system administrator can change the system time. However, if you want to synchronize the time via Network Time Protocol (NTP), you have to run NTP software, which will connect to external NTP servers and update the system time. It is not advisable to run application software on the server itself, since flaws in the software can lead to compromising all Containers on this server. Thus, if you plan to use NTP, you should create a special Container for it and configure it to have the
# pctl set 101 --capability sys_time:on --save Unable to set capability on running Container Saved parameters for Container 101
The output of the above command warns you that
# pctl stop 101; pctl start 101 Stopping Container ... Container was stopped Container is unmounted Starting Container ... Container is mounted Adding IP address(es): 192.168.1.101 Hostname for Container set: Container101 Container start in progress... # ssh root@ct101 root@ct101's password: Last login: Mon Feb 28 23:25:58 2007 from 10.100.40.18 [root@ct101 root]# date Mon Feb 28 23:31:57 EST 2007 [root@ct101 root]# date 10291300 Tue Feb 29 13:00:00 EST 2007 [root@ct101 root]# date Tue Feb 29 13:00:02 EST 2007 [root@ct101 root]# logout Connection to Container101 closed. # date Tue Feb 29 13:01:31 EST 2007
The command session above shows the way to change the system time from Container 101. The changes will affect all the Containers and the server itself. It is not advisable to have more than one Container with the
NTP is described in Internet Standard RFC 1305; more information including client software can be obtained from the NTP web server ( http://www.ntp.org ). |
||||
|