Network/Procedures/Migrate a VM from one Xen host to another

From Makers Local 256
Jump to: navigation, search

Note: You can only migrate from older or equal xen versions!!! If you try to migrate from newer to older, you will cause your VM to die.

  • On the target host, assuming the VM uses shared drbd storage, drbdadm verify mail_disk (or whatever your drbd volume is called in /etc/drbd.d).
  • On the target host, watch cat /proc/drbd and watch the little verify bar go across.

You really should wait for that verify to finish. Or, you know, #yolo - but don't go that route.

  • On the source, then the destination hosts, drbdadm primary mail_disk to bring the disks dual primary (where mail_disk is your disk id in drbd).
  • On the source host, xm migrate --live mail where "mail" is the domain's name and "" is the host you are migrating to.
  • Check the VM to make sure everything is cool.
  • On the source host, drbdadm secondary mail_disk to get out of the dual primary situation.

You did it!