The mechanism of migration in qemu

Tech Background

Howto

A is the source host, B is the destination host:

  1. Start the VM on B with the exact same parameters as the VM on A, in migration-listen mode: sh A# x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 linux-0.2.img -monitor stdio
B# x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 linux-0.2.img -monitor stdio -incoming tcp:0:4444 (or other PORT))
  1. Start the migration (always on the source host)
A# migrate -d tcp:<B's IP>:4444 (or other PORT)
  1. Check the status (on A only):
A# (qemu) info migrate
  1. Check the status (on B only):
B# (qemu) info status

Learning and Contribution

To be continued …

Aphorism

I don’t run away from a challenge because I am afraid. Instead, I run towards it because the only way to escape fear is to trample it beneath your foot!