August 6th, 2015

OpenVZ upgrade and migration script

Author: Andre Moruga

Every now and then our team is asked question "How do I move a container created on OpenVZ to Virtuozzo"? This is one of the issues which will be finally resolved in version 7 that we are now working on (first technical preview is just out). In this version the compatibility will be on binary and transfer protocol levels. So the regular mechanisms (like container migration) will work out of the box.
In prior version this task, although not technically difficult, is not very straightforward, the data images cannot be simply moved - depending on configuration used in OpenVZ, they may be incompatible.Besides, an OpenVZ based container will have configuration that needs to be updated to fit the new platform.
To facilitate such migrations, we created a script which automates all these operations: data transfer, migrating container configuration, and tuning configuration to ensure container will work on the new platform.
The script is available at https://src.openvz.org/projects/OVZL/repos/ovztransfer/browse/ovztransfer.sh. Its usage is simple: run it in the source (old) node, and specify destination host IP and list of containers to be migrated:

 $ ./ovztransfer.sh TARGET_HOST SOURCE_VEID0:[TARGET_VEID0] ...


For example:

 ./ovztransfer.sh 10.1.1.3 101 102 103


The script has been designed to migrate containers from older OpenVZ versions to v.7; however it should also work migrating data to existing Virtuozzo versions (like 6.0).
There is one restriction: containers based on obsolete templates that do not exist on the destination servers will be transferred as "not template based" - which means tools for template management (like adding an application via vzpkg) won't work for them.
This is a first version of this script; we will have an opportunity to improve it before the final release. That's why your feedback (or even code contributions) is important here.
If you tried it and want to share your thoughts, email to OpenVZ user group at users@openvz.org.

Join Our Team at ContainerCon 2015 Seattle

We're very excited that this year OpenVZ will have exhibit space at ContainerCon in Seattle, August 17-19. We will be showing and demoing OpenVZ server virtualization, answering questions and so on.

We would like the community to participate with us in the event. If you live in Seattle (or can come to this ContainerCon), are an OpenVZ user and would like to be a part of our team at the OpenVZ exhibit -- you are very welcome to join us! Please email me (sergeyb@openvz.org) your details and we'll discuss arrangements.