### Migrating Container

The Virtuozzo Hardware Node is the system with higher availability requirements in comparison with a typical Linux system. If you need to upgrade a Hardware Node hosting several Containers, then shutting it down for hardware upgrade will make all these Containers unavailable at once. You can also run a awkward situation when you are short of space for new Containers. To facilitate hardware upgrades and load balancing between several Hardware Nodes, Virtuozzo provides you with the ability to migrate Containers from one physical box to another.

Migrating Containers is possible if Virtuozzo for Linux is installed on two or more Hardware Nodes, so you are able to move a Container to another Node. Migration may be necessary if a Hardware Node is undergoing a planned maintenance or in certain other cases. In Virtuozzo 3.0, you can choose one of the following ways to migrate a Container:

- Migrating a Container by using the standard migration technology. In this case there is a short downtime needed to stop and start the Container during its migration from the Source Node to the Destination Node.
- Migrating a Container by using the zero downtime migration technology. In this case the 'stop' and 'start' operations are not performed and the migrated Container is restored on the Destination Node in the same state as it was at the beginning of the migration. This greatly reduces the migration time and puts it on the same footing as the delay caused by a short interruption in the network connectivity.

To migrate one or more Containers:

1. Select Service Director - Virtuozzo Manager - Container.
2. Select the Container(s) to migrate: check the box at the Container you want to migrate (to select all Containers check the box at the column heading) and click Migrate above the list.
3. In this window, you should do the following:
   1. Select the destination Hardware Node in the drop-down menu. Note that only those Hardware Nodes are displayed that are already registered in HSPC.
   2. If you want to make use of the Zero downtime migration, please check the corresponding checkbox.
   3. In the Migration Type option, select either the Live or Lazy migration to migrate the Container by using the zero downtime migration technology. The latter enables you to additionally speed up the migration process and can be efficiently used if your Container is running a number of memory-consuming applications.This decreases the size of the image file storing all Container private data and transferred to the Destination Node by leaving the main amount of memory in a locked state on the Source Node and swapping this memory from the Source Node on demand. Thus, the migrated Container can be started before the whole memory is transferred to the Destination Node, which drastically reduces the service delay of the corresponding Container. When a process tries to access a page of memory that has not yet been migrated, the request is intercepted and redirected to the Source Node where this page is stored.

      Note: You can find more information on the Containers migration in the Virtuozzo User's Guide Version 3.0.

   4. You can additionally Change Container IP addresses after migration according to IP pools assignment rules on destination node to match the IP addresses pool configuration on the target Hardware Node. You can leave out this option if you do not want to change the Container(s) IP address(es) for some reason, e.g. if you have fallen short of spare IP addresses on the target Node.
4. Click Migrate to initiate the operation.

Please send us your feedback on this help page