Hi, I have finally understand the whole workflow for migrate vm + storage migrate at the same time
(I don't have to much time to work on this, maybe it's better to have stable working disk clone/copy/live mirror code before ) Here somes notes: phase1 ------ target host ----------- create new volumes if storage != share --------------------------------------- add a new qm command ? phase2 ------ 1)target host send qm start to target: we need start the target vm with new disks locations. ----------------------------------------------------------------------------- How to do this ? Currently the target vm read the vm config file. Do we need to update the vmconfig file before mirroring ? or pass drive parameters in qm start command ? start nbd_server ---------------- nbd_server_start ip:port add drives to mirror to nbd --------------------- nbd_server_add drive-virtio0 nbd_server_add drive-virtio1 3)source host start mirroring of the drives ------------------------------ drive-mirror target = nbd:host:port:exportname=drive-virtioX when drive-mirror is finished, (block-job-complete), the source vm will continue to access volume on the remote host through nbd start vm migration ------------------ end of vm migration ------------------- phase3 ------ 1)target host resume vm ---------- nbd_server_stop --------------- 2) source vm delete source mirrored volumes ------------------------------- Other notes: ------------ How to handle migrate cancel, if drives are already mirrored, and source vm access through nbd on target host. _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel