WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] alternative ways to trigger a domain migration

To: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] alternative ways to trigger a domain migration
From: Robert Welz <welz@xxxxxxxxxxxx>
Date: Sat, 20 May 2006 23:45:15 +0200
Delivery-date: Sat, 20 May 2006 14:45:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060511161855.M43752@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <08f801c674a8$7c9d7720$462a0dd4@sb> <F4F43416-FD6F-4434-8017-3A30519B4713@xxxxxxxxxx> <20060511161855.M43752@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.8 (X11/20060505)
mr_ala wrote:
Hello
I wonder whether there are other ways than "xm migrate <domainname> ..." to
migrate a domain somewhere else. It would be great if the migration could be
triggered by the domain itself, not from dom0.

You could issue an ssh "forced command" from DomU to Dom0 which will do that.

You create a public/private keypair in DomU and put the public key in /root/.ssh/authorized_keys in Dom0.

Then you modify /root/.ssh/authorized_keys and put a command=/path/to/the/command in the first bytes of the key, f.e:

command="/root/bin/check_for_updates_ssh" ssh-rsa AAAAB3Nz+VKpU...

of course you have to configure /etc/sshd_config in Dom0.

Now from DomU you call
sss -i /homedir_dont_need_to_be_root/.ssh/mykey root@xxxxxxxxxxx

and that command would be executed. The command could be a shell-script or whatever you like. Even 2 or more commands are allowed f.e.

command="/usr/bin/updatedb; /usr/sbin/makewhatis -u" ssh-rsa C1yomIG4567XAme9...

Robert

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users