From KVM

KVM: migrating a VM on Qemu-0.8.2


  • Connection Establishment
migration listen  [local_host:port [remote_host:port]] -- listen on a port
migration connect [local_host:port [remote_host:port]] -- connect to a port
migration getfd fd (socket) -- get established connection (not implemented yet)
  • Management
migration start online/offline
migration cancel

Once started, offline migration can not be canceled.

  • Status
migration status
  • Migration Parameters (not implemented yet)
migration set rate min max offline -- set bandwidth control parameters (min, max, offline)
migration set total_time seconds -- set migration total_time (seconds)
migration show -- show migration parameters
  • Help
migration help

Example/ 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 stopped mode (-S)

2. Establish Connection (either A or B can listen/connect):

B: migration listen  BIP:port  [AIP:port] (e.g. migration listen 0:4444)
A: migration connect AIP:port   BIP:port  (e.g. migration connect 0:4445

3. Start the migration (always on the source host):

A: migration start offline

4. Check the status (on either host):

migration status


  • handle migration completion better (especially when network problems occur).
  • Online Migration.
  • Finish Interface implementation.
  • Migration does not work while CPU real-mode/protected mode are still changing.