DataLife Engine > Admin Notes > How to convert vmware vmdk image to kvm.

How to convert vmware vmdk image to kvm.


22 October 2009. Разместил: admin

First convert the .vmdk to a format compatible with qemu-img.

Turns out this can be done with vmware-vdiskmanager.

1. Converting from .vmdk

vmware-vdiskmanager -r Ubuntu.vmdk -t 0 Ubuntu-copy.vmdk

Note: If you have multiple disks, use Ubuntu.vmdk as well (you do not need to convert each Ubuntu-f001.vmdk).

Note: That is a -t Zero not a capital O. see man vmware-vdiskmanager.

Note: vmware-vdiskmanager is part of vmware server (and workstation, not sure about player).


2.Convert to .qcow2 (KVM, QEMU)


qemu-img convert Ubuntu-copy.vmdk -O qcow2 Ubuntu-copy.qcow2

3. Now you may run it in KVM.

kvm -hda Ubuntu-copy.qcow2 -net nic -net user -m 512