[ovirt-devel] v2v: download/stream disks via Libvirt API

Shahar Havivi shaharh at redhat.com
Thu Apr 7 08:14:02 UTC 2016


Hi,                                                                                                                                                                                                                  
                                                                                                                                                                                                                     
I want to add a utility to VDSM that stream domains disks from Libvirt remote                                                                                                                                        
machine to oVirt.                                                                                                                                                                                                    
This utility is needed for importing kvm based VMs to oVirt, currently we are                                                                                                                                        
importing VMWare and Xen VMs via virt-v2v which doesn't support kvm based VMs.                                                                                                                                       
                                                                                                                                                                                                                     
The tool should mimic virt-v2v output for smooth integration for v2v module                                                                                                                                          
in VDSM.                                                                                                                                                                                                             
                                                                       
As I see it the VDSM will parse the domain xml pass to the utility the source                                                                                                                                        
disks keys (remote path) and will prepare local image for the streaming:                                                                                                                                             
                                                                                                                                                                                                                     
$ kvmstream --uri qemu://mydomain.com/system --in /remote/disk1.img,/remote/disk2.img --out /local/disk1.img,/local/disk2.img                                                                                        
                                                                                                                                                                                                                     
The underline implementation is:                                                                                                                                                                                     
VDSM parse domain xml looks for storage disks, prepare images pass to the                                                                                                                                            
utility the local/remove disks,                                                                                                                                                                                      
The utility open connection to remote Libvirt use storageVolLookupByPath to                                                                                                                                          
locate each remote disk and uses virStorageVolDownload(remote, local) to                                                                                                                                             
stream the disks to VDSM.                                                                                                                                                                                            
                                                                                                                                                                                                                     
POC is ready download images with virt-v2v output,                                                                                                                                                                   
Any suggestions/notes?                                                                                                                                                                                               
                                                                                                                                                                                                                     
Thanks,                                                                                                                                                                                                              
  Shahar Havivi. 



More information about the Devel mailing list