VMware Cloud Community
HappyPig01
Contributor
Contributor

convert vmware vm to qemu vm

    Hello VMware community. I have come to a problem  and ned your help.

  I want to migrate a vm from vmware to kvm center. at the same time,  keep the vm business is still online , or the bussines can be down for  less than 3minuyes.

  First of all, i should obtain a  vmdk file which contains  the full vm data,then convert it to  qcow2 file.

There are  the following steps:

    1. enable cbt,take a snapshot,

    2. call Vsphere web api   QueryChangedDiskAreasans , get (offset ,length) list result;

    3. with result from step 2 , get effective blocks from all allocated blocks from snap file, write these effective blocks to target  vmdk file ;

    4. take another snapshot, call QueryChangedDiskAreasans , and get (offset ,length) list result ,just get  effective blocks from xxxx-delta.vmdk,then write these effective  blocks to target file

    repeat step 4  several times ,  when vm business is free then  convert target file to  qcow2 file.

   my question is how to access  xxxx-delta.vmdk between two snapshots and  read effective blocks ?

   what i want to do is get base data from step 2 and 3,  combine inc content from serveral steps just like step 4, then i can get all i need,so as not to miss anything

   Please help me ,thank you all.

0 Kudos
0 Replies