Changes

Jump to: navigation, search

Migration from one HN to another

159 bytes removed, 13:06, 12 August 2007
code -> pre
You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt. Run the following on the old HN.
<codepre>[root@OpenVZ ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Warning: Permanently added '10.1.5.6' (RSA) to the list of known hosts.
root@10.1.5.6's password:
id_rsa.pub 100% 231 0.2KB/s 00:00</codepre>
Run the following on the new HN.
<codepre>[root@Char ~]# cd .ssh/
[root@Char .ssh]# touch authorized_keys2
[root@Char .ssh]# chmod 600 authorized_keys2
[root@Char .ssh]# cat ../id_rsa.pub >> authorized_keys2
[root@Char .ssh]# rm ../id_rsa.pub
rm: remove regular file `../id_rsa.pub'? y</codepre>
Run the following on the old HN.
<codepre>[root@OpenVZ .ssh]# ssh -2 -v root@10.1.5.6
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Entering interactive session.
Last login: Thu Aug 9 16:41:30 2007 from 10.1.5.20
[root@Char ~]# exit</codepre>
Now that the vzmigrate script will function, a little bit on vzmigrate.
<codepre>This program is used for VE migration to another node
Usage:
vzmigrate [-r yes|no] [--ssh=<options>] [--keep-dst] [--online] [-v]
-v
Verbose mode. Causes vzmigrate to print debugging messages about
its progress (including some time statistics).</codepre>
Here is an example of migrating VE 101 from the current HN to one at 10.1.5.6:
<codepre>[root@OpenVZ .ssh]# vzmigrate 10.1.5.6 101
OPT:10.1.5.6
Starting migration of VE 101 on 10.1.5.6
Syncing 2nd level quota
Turning quota off
Cleanup</codepre>
[[Category:HOWTO]]

Navigation menu