I finally decided to migrate the last of my vmware-server systems to KVM.
The process is pretty simple and this is what I did.
- As my vmdk file was split into many 2Gb chunks I had to firstly convert that into a monolithic file. This is easily achieved with the vmware-vdiskmanager utility supplied with vmware-server (or at least the version 1.0.x of vmware-server I was running 🙂 )
vmware-vdiskmanager -r winxp.vmdk -t 2 winxp-full.vmdk
The -t 2 is the important part taking all the 2Gb chunks *referenced* by the vmdk file and creating an equivalen single pre-allocated vmdk file.
- Once you have that file then it’s a simple qemu-img command to convert it to something that KVM is happy with. In my case I wanted QCOW2 format.
qemu-img convert winxp-full-flat.vmdk -O qcow2 winxp.img
You will notice that I said -full.flat.vmdk – this is the pre-allocated file referred to by the new winxp-full.vmdk file.
- That’s it 🙂