Updating Containers
Virtuozzo Server provides three means of keeping your containers up to date:
- Updating EZ template RPM packages on the node so that new containers are up to date.
- Updating caches of the EZ templates installed on the node to create new containers quicker.
- Updating EZ templates inside existing containers to keep existing containers up to date.
Updating EZ Templates
You can update an EZ template like any other RPM package using the yum update command. For example:
| |
Note the following:
- Updating an EZ template requires that you append
ezto template name. - You can also use the
vzpkg update templatecommand to update EZ templates.
Updating EZ Template Caches
With the release of new updates for the corresponding Linux distribution, the created EZ template cache can become obsolete. Virtuozzo Server allows you to quickly update your EZ template caches using the vzpkg update cache command.
When executed, vzpkg update cache checks the cache directory in the template area (/vz/template/cache by default) on the hardware node and updates all existing tarballs in this directory. However, you can explicitly indicate the tarball for what EZ template should be updated by specifying the EZ template name. For example, to update the tarball for the centos-6-x86_64 EZ template, run this command:
| |
Upon the vzpkg update cache execution, the old tarball name gets the -old suffix (e.g., centos-x86.tar.gz-old).
You can also pass the -f option to vzpkg update cache to remove an existing tar archive and create a new one instead of it.
If the vzpkg update cache command does not find a tarball for one or several EZ templates installed on the server, it creates tar archives of the corresponding EZ templates and puts them to the /vz/template/cache directory.
Updating EZ Templates in Existing Containers
You can update packages of a container EZ template with the vzpkg update command. For example, to update all packages of the template centos-6-x86_64 used in the container with the UUID 26bc47f6-353f-444b-bc35-b634a88dbbcc, run
| |
Note the following:
- Updating EZ templates is supported for running containers only.
- If you are going to update the cache of a commercial EZ template, first update software packages in the remote repository used to handle this EZ template and then proceed with updating the EZ template cache.
As you can see from the example above, the httpd and vzdev applications have been updated for the centos-6-x86_64 EZ template. If you wish to update all EZ templates (including the EZ template) inside the container at once, run:
| |
In the example above, only the hwdata package inside the container needed to be updated.