I need to migrate containers from one VZ node to another, however source node has some custom EZ OS templates and EZ application templates installed. Is it possible to transfer my custom EZ OS and application templates to another VZ node?
Parallels Virtuozzo Containers allows you to copy the installed OS and application EZ templates from one Hardware Node to another using the vzmtemplate utility.
For example, you can copy the fedora-core-13-x86 OS template installed on the Source Node to the Destination Node with the IP address of 192.168.0.9 by executing the following command:
# vzmtemplate -z email@example.com fedora-core-13-x86 firstname.lastname@example.org's password: Connection to Destination Node (192.168.0.9) is successfully established Copying Template ".fedora-core-13-x86" ...
During the command execution, vzmtemplate will do the following:
- Ask you for the password of the root user on the Destination Node.
- Check whether the fedora-core-13-x86 OS EZ template already exists on the Destination Node. If this templates is installed on the Destination Node, the command will exit.
- Copy the fedora-core-13-x86 configuration files from the Source Node to the Destination Node. Keep in mind that the fedora-core-13-x86 OS EZ template is not removed from the Source Node.
- Run the vzpkg create cache command on the Destination Node to cache the OS EZ template and prepare it for the Container creation. Detailed information on this command is provided in the Preparing OS EZ Templates for Creating Containers section.
Example of copying EZ application template named "yum" of Centos 6 OS template to node:
# vzmtemplate -z -b DESTINATION_IP_ADDR yum@centos-6-x86_64
*(the command above would copy only application template)
Note: If you are going to copy an application EZ template, you should make sure that the corresponding OS EZ template (i.e. the OS template with which the application EZ template can be used) is installed on the Destination Node; otherwise, the operation will fail.
Also, see Copying EZ Templates to Another Hardware Node in VZ Templates Management Guide.