.. or even ignore that it is xen, basically this command moves the content of an logical volume to another server, reducing bandwidth using gzip compression.
prerequisites:
- create lvm on target machine
- install "pv" on src machine
run
root@src:# dd if=/dev/vg/disk bs=4096 | pv | gzip -1 | ssh -p2222 targethost.org "gzip -dc | dd of=/dev/vg/disk"
on your target machine you may want to:
- resize2fs if the target lvm is larger
- fsck.extX /dev/vg/disk on the target machine
- edit the domU.cfg according to your target machine
- mount /dev/vg/disk /mnt && chroot /mnt
** edit network, hostname, hosts