User`s guide

Managing Resources 101
As you can see, both the server and the Containers have each gained more than 600 MB of disk
space. In real life, the disk space is gained by caching not one huge file in two Containers but a
number of identical files across many Containers.
The operation of the vzcache utility may be customized to a certain extent by using vzcache
command line switches (see the Parallels Command Line Reference Guide for details).
Associating Container Files With Application Templates
It may often happen that a security update should immediately be applied to a package installed
as a template on the server and added to a number of Containers hosted there. However, it takes
certain time to prepare a template update, so the server and/or Container administrators are not
inclined to wait for it and they install the original security update directly inside the Containers.
As to the template update, it becomes available a few days afterwards. In other cases, a
Container administrator might not know that there is a certain template installed on the server,
so they install the corresponding application directly inside their Container.
To eliminate cluttering up the Container disk space with application files that are present as part
of an application template on the server, the vzpkg link utility is used. When executed, this
utility links your Container to the application EZ templates installed on the server. Assuming
that you manually installed the openssl application inside Container 101 running Fedora 8,
you can use the following command to replace the openssl files inside this Container with
symlinks to these files in the /vz/template/fedora-
core/8/x86/config/app/openssl directory on the server:
# vzpkg link 101
Detaching Containers From Caches
Whereas the vzcache utility helps effectively gain disk space both on the Parallels server and
within Containers, there may be situations when it is necessary to detach a Container from its
cache and copy the cached files back to the Container private area. A typical example of this is
migrating a Container to another Parallels server. The migration is not possible if there are links
in the Container private area pointing to the /vz/template/vzcaches directory on the
server.
To copy the cached files back to the Container private area, the vzuncache utility is used:
# vzuncache 101 -a
[Optimization messages skipped...]
Container 101 53 magic symlinks to convert
Container 101 will be detached from the following caches:
Cache name Size
dhcp0-84.sw.ru-2005030316237 607972K
Now Container 101 can safely be migrated to another Parallels server. Note that unlike
vzcache, the vzuncache utility shall be called for only one Container at a time. The -a
switch tells the utility to detach the Container from all the cache directories specified in its
configuration file as the value of the VZCACHE parameter.