VBoxManage can't directly convert vdi to qcow2, so there is two options :
- With
VBoxManageconvert vdi to raw and withqemu-imgconvert raw to qcow2 - With
qemu-imgconvert vdi to qcow2
Notes : vdi are compressed and raw images are not so you will need to leave enough disk space for entire uncompressed disk. qcow2 images are compressed too and automaticaly sized.
Method with intermediate#
- Make sure the VirtualBox VM is shutdown
- Convert the vdi to a raw disk images
VBoxManage clonehd --format raw vm.vdi vm.raw- Convert the raw to qcow2 disk images
qemu-img convert -f raw vm.raw -O qcow2 vm.qcow2Direct method#
qemu-img support VDI, so it can be convert directly:
qemu-img convert -f vdi vm.vdi -O qcow2 vm.qcow2