How To Do Live Migration Of OpenVZ Containers

Written By
FT
Falko Timme
May 7, 2009

[ Thanks to Falko
Timme
for this link. ]

“2 Live Migration Of vm1.example.com From server1 To
server2

“To check if the live migration is really done “live”, i.e.
without interruption of the guest, you can log into vm1.example.com
(e.g. with SSH) and ping another server:

“vm1.example.com:

ping google.com

“This will ping google.com until you press CTRL + C. The pinging
should continue even during the live migration.

“server1:

“I want to run the live migration as the root user. Live
migration will work only if the root user on server1 can log into
server2 via SSH without being asked for a password (this means SSH
root logins must be allowed on server2 – check your sshd
configuration: /etc/ssh/sshd_config). This can be achieved by
generating a key pair for root@server1 and then store
root@server1’s public key in the ~/.ssh/authorized_keys file of
root@server2. Fortunately, there’s a bash script that can do this
for us. We create the script as follows:”


Complete Story

FT

Falko Timme

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.