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

Re: [Xen-users] migrate virtual machine to another server

I felt i should jump in :)

Whenever I do a "vm move" I preffer to keep a snapshot of the machine
just in case.

On Fri, May 13, 2011 at 11:59:03AM -0400, John Madden wrote:
> Tsk, tsk.  Do it in one step:
> dd if=/dev/mapper/srcdisk bs=1M | ssh root@targetserver "dd
> of=/dev/lvm/tgtdisk bs=1M"

To save you some space, you can simply "gzip" the disk:

dd if=/dev/mapper/srcdisk bs=64k | gzip -c > srcdisk.gz

This has saved me a lot of space. I always smile when my 20-50GB lvm
volumes suddenly take up just 5GB of disk space.

And obviously you can gzip over ssh too, you'll just need to gunzip -c
and dd with the correct bs on the other end. Depending on your upload
speed, this might actually save you some time. I use this to pull images
down (over ADSL) from my hoster to the xen test server i have at home.

Dmitry Nedospasov <dmitry@xxxxxxxxx> -- Twitter: @nedos
Web: http://nedos.net -- Github: http://github.com/nedos

Xen-users mailing list



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