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

[Xen-users] Re: Move doms to new machine

Date: Mon, 14 May 2007 13:52:12 -0400
From: Maximilian Freisinger <deepc2005@xxxxxxxxxxx>
Subject: [Xen-users] Move doms to new machine
To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Message-ID: <BAY121-W5673D7453D66FBE5FA5D0BF3E0@xxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"




Hello,I need to move some doms from an old rootserver to my new one.The domUs are running on lvm.The problem is, that i first have to stop the old one before i get the new on online.So i somehow have to save the domUs to my local machine and then reintegrate them on the new server.My question now is, how do i do that???Thx, DC

Your best bet is to use rsync to copy the domain. Start by creating the filesystem on the new machine, then mount it, and rsync the domain on the old machine to it. You can do this either by mounting the LVM on the dom0, or from within the running domU.

Copy the configuration for the domain over from the old host to the new one, and use it to bring up the domU on the new host briefly. This is just to verify that it will come up OK. Be careful here, as the new copy will have the same IP settings as the old one, so you can end up with a conflict on your network.

Once you're confident that your setup is OK on the new host, do two more rsync's. The first one will be while the domU is still running. This will get the original and the copy as close to each other as possible. Then shut down the original domU, do the last rsync, and start the domU on the new machine. Depending on how long the rysnc takes, your downtime should be just a few minutes.

Don't forget to explore the options to rsync. You'll want -a (for 'archive'), and --delete (to make sure files the have been deleted on the original get deleted on the copy).


root@oldhost# rsync -aP --delete /var/vm/domU-orig  newhost:/var/vm/domU-copy

Paul

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Re: Move doms to new machine, Paul Archer <=