[pve-devel] [PATCH v4 qemu-server 0/3] online vm migration to external cluster

Alexandre Derumier aderumier at odiso.com
Tue Jan 8 02:00:11 CET 2019


This add support to migrate a vm online to an different external cluster.
(This a rework of a previous patch series sent 2years ago)


qm migrate_external <vmid> <targetremotenode> [--targetstorage otherstorage] [--targetbridge otherbridge] [--targetvmid] [--targetkey]


targetstorage && targetbridge are optional, if not defined it's used same name than source

targetremotenode is a fqdn host from another cluster. 
(source node must be able to root ssh to target node with public key)

source vm is not deleted currently for safety, just stopped and the migrate lock keeped to avoid
to restart it.

1 private ssh key need to be created for each targetremotenode in:
/etc/pve/priv/migrate_external/id_rsa_mytargetnode


Changelog v4:
 - fix targetremovenode : can be fqdn or ip address
 - add optionnal targetkey && targetvmid
 - migrate : add a new QemuMigrationExternal.pm with all migration code + remove some part not used, like sync_disk and zfs replication.
 - migrate : force ssh tunnel for migration
 - vm_start : put code in patch3 + remove old no more used  migration_type=external option 


*** BLURB HERE ***

Alexandre Derumier (3):
  api2 : add migrate_vm_external
  add QemuMigrateExternal.pm
  qemu : vm_start : add external_migration

 PVE/API2/Qemu.pm           | 112 +++++-
 PVE/CLI/qm.pm              |   2 +
 PVE/Makefile               |   1 +
 PVE/QemuMigrateExternal.pm | 866 +++++++++++++++++++++++++++++++++++++++++++++
 PVE/QemuServer.pm          |  20 +-
 5 files changed, 995 insertions(+), 6 deletions(-)
 create mode 100644 PVE/QemuMigrateExternal.pm

-- 
2.11.0




More information about the pve-devel mailing list