vdi file is a type of disk image used by VirtualBox. qcow2, on the other hand, is the format of disk image used by KVM.
Recently, I want to move some existing virtual machines running on VirtualBox to KVM. To do that I need to convert the disk image from vdi to qcow2. Here’s one way to achieve that: