Convert Virtualbox .vdi file into KVM .img


 I was using  Virtualbox  then i switched to  KVM (qemu-kvm)   and  want to use all the vm's  which was in virtualbox


Note:  there are  some steps  for converting  VDI  file to  IMG file

Open your  terminal  or cmd

Step 1:    Use  VMboxmanage  command 

root@Xpert:#   VBoxManage clonehd --format RAW redhat7.vdi vm.img



Note:    you  can  use this image directly in  KVM  or you can convert  into qcow2 file


OPtional

Step  2:    img to  qcow2

root@Xpert:#   qemu-img convert -f raw vm.img -O qcow2 vm.qcow2



Step 3:    BOOT  from  .img  file


root@Xpert:#   virt-install  --name  redhat77  --ram  2048  --vcpu 2  --disk path=/var/lib/libvirt/images/vm.img   --import 




 









Comments