========== XL Migrate ========== :Author: Zhigang Wang :Contact: zhigang.x.wang@xxxxxxxxxx :Date: 2013-03-08 Current Status ============== * xl migrate leverages ssh/sshd. * In order to migrate a VM without user interactive, we have to configure ssh keys for all Servers in a pool. Key management brings complexity. * In certain cases, customers need non-ssl migrate, which greatly improves the migration speed. There's no way to do it with ssh. * Current xl migrate command is not intuitive, especially the `-s` option:: # xl migrate Usage: xl [-v] migrate [options] Save a domain state to restore later. Options: -h Print this help. -C Send instead of config file from creation. -s Use instead of ssh. String will be passed to sh. If empty, run instead of ssh xl migrate-receive [-d -e] -e Do not wait in the background (on ) for the death of the domain. It's a little hard to adapt other tools as transport. * We have differnt implementation for `xl save/restore` and `xl migrate/migrate-receive`. Can we merge them? Proposal ======== * Implement dedicated daemons for ssl and non-ssl migration receive (`socat `_ can be used). Example patch for dedicated migrate receive daemon: xen-xl-migrate-socat.patch `socat` will call `xl restore` instead of `xl migrate-receive` after the following change. * Merge `xl migrate/migrate-receive` to `xl save/restore`: - To save a VM:: # xl save [-c] -f vm.chk Or:: # xl save [-c] >vm.chk - To restore a VM:: # xl restore -f vm.chk Or:: # cat vm.chk | xl restore - To migrate a VM using ssh/sshd:: # xl save -c | ssh root@ xl restore We can implement a wrapper to make `xl migrate ` to call the above command. - To migrate a VM using dedicated migrate receive daemon:: # xl save -c | socat - TCP::8004" Or with SSL:: # xl save -c | socat - OPENSSL::8005,verify=0 - Localhost migration:: # xl save | xl restrore - Localhost live migration:: # xl save -c | xl restrore Patch: I don't have the capability and time to implement it yet.