The mechanism of migration in qemu
Tech Background
- Live Migrating QEMU-KVM Virtual Machines - This discussion will go through the simple design from the early days of live migration in the QEMU/KVM hypervisor, how it has been tweaked and optimized to where it is now, and where we’re going in the future. It will discuss how live migration actually works, the constraints within which it all has to work, and how the design keeps needing new thought to cover the latest requirements.
Howto
A is the source host, B is the destination host:
- 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))
- Start the migration (always on the source host)
A# migrate -d tcp:<B's IP>:4444 (or other PORT)
- Check the status (on A only):
A# (qemu) info migrate
- 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!