[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: Robert Welz <welz@xxxxxxxxxxxx>
  • Date: Sat, 20 May 2006 23:45:15 +0200
  • Delivery-date: Sat, 20 May 2006 14:45:49 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.