[pve-devel] storage migration: extend "qm migrate"?

Michael Rasmussen mir at datanom.net
Thu Jan 17 13:24:47 CET 2013


On 01-17-2013 12:47, Alexandre DERUMIER wrote:
>
> Yes, I known.
> But It's not too much different, we can reuse code, just using nbd as
> target instead a volume file/device.
>
I was looking at nbd before I was aware of that qm migrate was able to 
do the job. The changes are relatively
simple and can be manage via qmp on both side. Asumption: We are only 
talking about a node in a cluster. If
we are talking about a node outside of a cluster then it is much more 
complicated task.

> My proposal was to reuse "qm migrate",to avoid having 2 apis for
> migrate storage(1 for target storage on localhost, 1 for target
> storage on remote host)
>
> if hosttarget = sourcetarget, then we simply migrate the disks
> if hosttarget != sourcetarget, we mirror the disks with nbd (only if
> the storage is non-shared on both hosts), then we migrate the vm.
>
Sound reasonable. Detecting whether storage is shared on target is a 
simple api call.

-- 
Hilsen/regards
Michael Rasmussen



More information about the pve-devel mailing list