How to convert VirtualBox vdi to KVM qcow2


http://www.randomhacks.co.uk/how-to-convert-virtualbox-vdi-to-kvm-qcow2/


July 12, 2013 KVM, Ubuntu Server

It is very easy to convert a VirtualBox .vdi disk images to KVM qcow2 file. You have to use the RAW file format as an intermediate.

1 – Make sure the VirtualBox machine is shutdown.

2 – Convert the vdi to a raw disk images. Note: vdi are compressed and raw images are not and so you will need to leave enough disk space for entire uncompressed disk.

VBoxManage clonehd --format RAW vm.vdi vm.img

3 – Then on your KVM host:

qemu-img convert -f raw vm.img -O qcow2 vm.qcow2

Hope this is helpful.



posted @ 2016-06-29 10:35  张同光  阅读(296)  评论(0编辑  收藏  举报