[pve-devel] [PATCH v3 qemu-server 0/7] online vm migration to external cluster
Alexandre Derumier
aderumier at odiso.com
Tue Nov 27 16:38:02 CET 2018
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]
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 v3:
- prepare : shell_quote arguments in vm create (to escape options like -cpu +spectre;+ssbd;)
- phase2 : bugfix for --targetstorage option
Changelog v2:
- add migrate_external api2 (please check the api root permission)
- add targetbridge option
- fix targetremotenode fqdn resolution
- use pvesh to get nextvmid on remote cluster
- add sshkey
- add missing "\n" in some die messages.
Alexandre Derumier (7):
api2 : add migrate_vm_external
migrate : prepare : add create_vm for external migration
migrate : phase1 : skip sync_disk for external migration
migrate : phase2 : migrate external
migrate : phase2_cleanup : migrate_external
migrate : phase3_cleanup : migrate_external
migrate: add sshkey in /etc/pve/priv/migrate_external/
PVE/API2/Qemu.pm | 102 ++++++++++++++++++++++++++++++++-
PVE/CLI/qm.pm | 2 +
PVE/QemuMigrate.pm | 164 ++++++++++++++++++++++++++++++++++++++++++++---------
PVE/QemuServer.pm | 20 +++++--
4 files changed, 253 insertions(+), 35 deletions(-)
--
2.11.0
More information about the pve-devel
mailing list