Convert qcow to lvm

If you have a scenario where you have to convert qcow images to lvm here is how you can achieve this.
In my case I had to migrate from old hypervisor to new one and old one had qcow ones on new one disk were set as lvm.

So first I had to convert those images to raw

qemu-img convert dhcp1_system.qcow2 -O raw dhcp1_system

Then simply figure out its size and allocate that on your lvm partition

ls -la dhcp1_system
-rw-------. 1 root root 16106127360 Feb  5 13:27 dhcp1_system

So now we know how much space we need and we create lvm based on it

lvcreate -L 16106127360b -n dhcp1_system vg_kvm

Since we have space allocated all we need is to write data to there

dd if=dhcp1_system of=/dev/vg_kvm/dhcp1_system bs=4M

Now we have disk created and data moved all we need is to update xml of vm we just migrated. This can be achieved by virsh

virsh edit dhcp1
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/kvm/dhcp1_system.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

On disk section of xml edit parts where it states file and type as needed

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/vg_kvm/dhcp1_system'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>