|.: Moving a KVM guest to another machine|
- Properly shutdown the guest:
- Create an LVM volume of the same size on the new machine:
newmachine# lvcreate -L 120G -n myguest myvolgroup
- Copy the disk from the old machine over to the new one:
oldmachine# dd if=/dev/vg_foo/lv_bar | ssh newmachine dd of=/dev/volgroup/myguest
- Wait for the transfer to complete (on a 100Mbit/s connection it took about 3.5 hours to transfer the 120GB).
- Copy /etc/libvirt/qemu/myguest.xml from the old machine over to the new machine and adapt the LVM path for the disk.
- Reload the libvirt configuration:
newmachine# /etc/init.d/libvirt-bin reload
- Start up the guest on the new machine:
newmachine# virsh start myguest
blog comments powered by