Logo
  • Entries
  • Comments
  • Popular
Recent Posts
  • January 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • July 2007
Recent Comments
  • Makendra It's always a pleasure to hear from someone with eexrpitse....
  • Rubén Ortiz Hola dependerá de varias cosas pero la respuesta sería NO. ...
  • jose miguel perea Buenos días, ¿La replicación entre maestro y esclavo es i...
  • Rubén Ortiz Si lo hacéis legal, con VMware el único problema son los cos...
  • Angel Hola, estamos valorando implementar baremetal para crear un ...
Popular Articles
  • Declaro la guerra al mosquito Tigre (35)
  • Phpbb3 - encode error converter (19)
  • MySQL - Variables básicas a configurar (17)
  • Reinicio programado Windows 2003 Server (16)
  • Plesk - Evitar el SPAM (10)
  • Home
  • Contacta
  • Hosting Linux
  • Legal
  • Sobre mí – About me

Vzmigrate

Posted by Rubén Ortiz on Jul 1, 2008 in Linux, OpenVZ | 0 comments

Una vez tenemos instalado OpenVZ y la herramienta vzmigrate, necesitamos configurar los certificados ssh entre la máquina origen y la máquina destino.

Crear certificados SSH entre servidores

Máquina origen = 10.0.0.50
Máquina destino = 10.0.0.100

“You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt.” Es decir, hemos de permitir al viejo hardware node ser capaz de loguearse contra el nuevo, sin usar un password.

En la máquina origen, ejecutamos

1
<strong>#ssh-keygen -t rsa</strong>

No hemos de teclear nada cuando nos pide una frase, doble Enter y seguimos. Veremos lo siguiente:

1
2
3
4
5
6
7
8
9
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx root@localhost.localdomain
La llave se ha guardado den el directorio /root/.ssh/
1
2
3
4
<strong>
# cd /root/.ssh
# ls - ls /root/.ssh
</strong>

Veremos el archivo creado

1
2
4 -rw------- 1 root root 1743 May  6 10:03 id_rsa
4 -rw-r--r-- 1 root root  408 May  6 10:03 id_rsa.pub

Copiamos la clave a la máquina destino:

1
<strong># scp id_rsa.pub root@10.0.0.100:./id_rsa.pub</strong>

Puede que veamos el siguiente error

1
2
3
4
5
ERROR!
[root@localhost .ssh]# scp id_rsa.pub root@10.0.0.100:./id_rsa.pub
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Editamos known_hosts y quitamos la línea con la ip destino involucrada. Volvemos a repetir el proceso, y deberíamos poder copiar la llave pública sin problemas.

1
<strong># scp id_rsa.pub root@10.0.0.100:./id_rsa.pub </strong>
1
2
3
4
5
6
The authenticity of host '10.0.0.100 (10.0.0.100)' can't be established.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.100' (RSA) to the list of known hosts.
reverse mapping checking getaddrinfo for es failed - POSSIBLE BREAK-IN ATTEMPT!
root@10.0.0.100's password:
id_rsa.pub                                    100%  408     0.4KB/s   00:00

Nos conectamos ahora al nuevo host, máquina destino. Añadimos la llave pública importada del servidor origen a autorized_keys2 para finalmente borrar el mismo archivo copiado.

1
2
3
4
5
6
7
<strong>
# cd .ssh/
# touch authorized_keys2
# chmod 600 authorized_keys2
# cat ../id_rsa.pub &gt;&gt; authorized_keys2
# rm ../id_rsa.pub
</strong>

Desde el servidor origen:

1
<strong># ssh -2 -v root@10.0.100</strong>

Si nos conectamos bien, sin necesidad de teclear el password es que ya podemos utilizar la herramienta vzmigrate.

1
<strong># /bin/sh /usr/sbin/vzmigrate -r no -v 10.0.0.100 VED_ID</strong>

Prerequisitos de Vzmigrate

Make sure:

  • you have at least one good backup of the virtual machine you intend to migrate
  • rsync is installed on the target host

No Responses to “Vzmigrate”

  1. Rubén Ortiz » Putty y certificados SSH says:
    7 de May, 2009 at 12:59 pm

    [...] linux remota y accedemos al directorio /root/.ssh. Para ver como se crea este directorio ir a este link. Añadimos el contenido de la llave pública al fichero authorized_keys y [...]

Leave a Reply

Click here to cancel reply.

Nube de Tags

apache bare metal benchmark cacti centos dell drupal esxi General gripe A Hardware humor IIS kayako Linux lpi lyric Lyrics memcached mysql nginx openfiler OpenVZ openx Parallels php Phpbb plesk postgresql proftpd raid SQL Server ssh svn trac ubuntu varnish Virtualizacion Virtuozzo Virtuozzo Linux Warphammer.net Windows windows 2003 wordpress zabbix

Categorias

  • 2003 Server
  • Apache 2.X
  • benchmark
  • Centos
  • Cuanto (Luser) Cabron
  • ESXi
  • General
  • Hardware
  • IIS
  • Lighttpd
  • Linux
  • Lyrics
  • MySql
  • Nginx
  • OpenVZ
  • Parallels
  • Parallels Bare Metal
  • Php
  • Phpbb
  • Plesk
  • PostgreSQL
  • Prestashop
  • Software
  • SQL SERVER
  • Ubuntu
  • Varnish
  • Virtualizacion
  • Virtuozzo
  • Virtuozzo Windows
  • VMWare
  • Warphammer.net
  • Windows
  • Wordpress

Blogroll

  • David Toribio
  • EasyCompany.es
  • Marius Duch
  • Series
  • Warphammer.net

Recursos

  • Backup Plesk9
  • CentOS 5 32 bits RPMs
  • CentOS 5 64 bits RPMs
  • Lighttpd
  • MySQL Tunner
  • OpenVZ – Panel – PROXMOX
  • OpenVZ – Panel – VTONF
  • OpenVZ Wiki
  • Parallels Virtual Automation Resources
  • Plesk 8 Docs
  • Plesk 9 Docs
  • Plesk Hacker
  • Port80 – Compression Check
  • Virtuozzo DOCS
  • Virtuozzo Lin Commands
  • Virtuozzo Win Commands
  • Virtuozzo Windows Docu

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Designed by Elegant Themes | Powered by Wordpress