XenServer migrate machines between hosts
I think that the fastest way to do the migration is to use a disk imaging software. In the company i work almost all the machines are hosted in XEN and VMWARE servers. We are facing this situation very often. We use Active@ Boot Disk that is very fast and reliable. At first boot with the cd in the server you want to transfer and backup to a network folder your server image. Then at the new XEN server, boot and restore that image to the new server. I hope this help.
Taking the Logical Volume and copying it to the remote host works. But it takes time. And it's a waste of time if the partition isn't fully utilized Especially if its a big partition as unused space will be copied as well.
I'm using Xen on Debian, but it should be generic enough for other set-ups
When I move my XEN machines I do this:
- Shut down the vm
- Mount the VM localy in read only (nice to be safe)
- Create an new LVM for disk/swap on the destination machine
- Create file-system and swap on the LVMs
- Mount the file-system
- Copy Xen config file to the new xen DomU
- rsync -avrplEHXgo --numeric-ids --exclude=/mnt/ --exclude=/proc/ --exclude=/dev/ --exclude=/tmp/ from-source-machine to destination-machine
- On destination, create mnt, proc, dev , swap with the proper permissions. un-mount the file-system
and you should be ready to go
In the interest of minimizing downtime, you can create a snapshot. Then you can export it, move it and import it on the new machine.