[pve-devel] Storage migration: RFC

Alexandre DERUMIER aderumier at odiso.com
Tue Dec 18 09:15:54 CET 2012


>>Hi all, 

Hi Michael,
I'll submit today (in some hours) my work on vm template-cloning.

New version include linked clone and also clone copy. (aka disk copy).
disk copy already working with all storage/formats, using qemu-img convert for now.
So maybe you can extend it , or use it as sample.


>>I have designed the conceptual solution for off-line storage migration 
>>as can be read below (Also attached for better readability). Every 
>>usecase have been tested from the command line and found working. Do 
>>you have any comments or have I left something out? 
>>
>>Storage migration 
>>
>>Two distinct usecases - offline and online. 
>>Four storage backend - raw, qcow2 and vmdk. 
>>Two distinct environments - NFS and iSCSI(LVM). 
>>Implementation preserves the machine on its current node. 

It should works will all storage plugins, including sheepdog,rbd,nexenta,...and maybe future storage plugins.

So I think we need to use "qemu-img convert" as default, 
then if needed (faster method?), implemented specific copy sub for each pve-storage plugin,depend of the source/destination


example:

file plugin:
sub volume_copy({
if(srcvolid = raw && dstvoldid = lvm)
  cmd = dd if=/path/file.raw of=/dev/lvmdevice

}


lvm plugin:
sub volume_copy({
if(destvolid = raw)
  cmd = dd if=/dev/... of=/path/file.raw

}

rbd plugin:

sub volume_copy(
if(destvolid = rbd)
  cmd = "rbd copy ..."

}



>>PS. Does the current API contain any utility for changing a vm.conf? 

"qm set <vmid> ..."


Regards,

Alexandre



More information about the pve-devel mailing list