Difference between revisions of "Sysadmin/Migrate virtual machine"

From Sugar Labs
Jump to navigation Jump to search
(Created page with '== How to migrate a KVM machine from an LVM partition == (untested procedure) First, shutdown the VM, then do: mount /dev/treehouse/beamrider-root /mnt ssh housetree mount /…')
(No difference)

Revision as of 13:21, 9 December 2009

How to migrate a KVM machine from an LVM partition

(untested procedure)

First, shutdown the VM, then do:

mount /dev/treehouse/beamrider-root /mnt
ssh housetree mount /dev/housetree/beamrider-root /mnt
rsync -PHAXphax --delete --numeric-ids /mnt/ housetree:/mnt/
rsync -a /etc/libvirt/qemu/beamrider.xml housetree:/etc/libvirt/qemu/
umount /mnt
ssh housetree umount /mnt

Then log to $OTHERHOST and create the domain in virsh.

Downtime can be reduced to just a few minutes by doing a first rsync iteration from within the VM while it's still running.

Make sure you pass all the fancy switches to rsync or you'll loose information on the copy.