[pve-devel] [PATCH v2 qemu-server 0/2] remote-migration: migration with different cpu

Alexandre Derumier aderumier at odiso.com
Tue Apr 25 18:52:31 CEST 2023


This patch series allow remote migration between cluster with different cpu model.

A new param is introduced: "target-cpu"

When target-cpu is defined, the live migration with memory transfert
is skipped (as anyway, the target will die with a different cpu).

Then, after the storage copy, we call agent fsfreeze or suspend the vm
to have coherent data.

Then we stop the source vm and stop/start the target vm.

Like this, we can reduce the downtime of migration to only 1 restart.



Changelog v2:

The first version was simply shuting down the target vm,
wihout doing the block-job-complete.

After doing production migration with around 400vms, I had
some fs corruption, like some datas was still in buffer.

This v2 has been tested with another 400vms batch, without
any corruption.


Alexandre Derumier (2):
  migration: move livemigration code in a dedicated sub
  remote-migration: add target-cpu param

 PVE/API2/Qemu.pm   |  18 ++
 PVE/CLI/qm.pm      |   6 +
 PVE/QemuMigrate.pm | 439 ++++++++++++++++++++++++---------------------
 3 files changed, 260 insertions(+), 203 deletions(-)

-- 
2.30.2





More information about the pve-devel mailing list