Virtuozzo : Migrate containers from master to master hardware node

By | June 30, 2012

Migrating Parallels Virtuozzo virtualization software containers from two remote master hardware nodes can’t be done using the hot migrate function included in the control panel.

The migration must be done manually for each containers or virtual machines you want to move. Here is a simple procedure how to proceed :

1. You MUST first completely shutdown the container and disable the offline management feature :

vzctl stop <container_id>
vzctl set <container_id> --save --offline_management no

2. Transfer the container folder from source to the remote server :

rsync -avz -e "ssh -p <tcp_port>" /vz/private/<container_id> root@<remote_server_ip>:/vz/private

*We use Rsync to transfer the files, compress the data and keep permissions on files. You must temporarily allow root direct login to the server if needed. Using another user will prevent keeping those permissions,

3. Upon successful transfer, you must link the config file into the hardware node :

ln -s /vz/private/<container_id>/ve.conf /etc/vz/conf/<container_id>.conf

4. Start the container :

vzctl start <container_id>