Parallels Virtuozzo Containers 4.6 for Linux


Add to my manuals
384 Pages

advertisement

Parallels Virtuozzo Containers 4.6 for Linux | Manualzz

Advanced Tasks 283

Changing System Time From

Container

Normally 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 sys_time capability. The example below illustrates configuring such a Container:

# vzctl 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 vzctl cannot apply changes in the capabilities to a running Container. The Container has to be restarted before changes take effect:

# vzctl stop 101; vzctl 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 sys_time capability set on.

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).

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents