Converting VMware (VMX) images with virt-v2v

virt-v2v is a tool that can be used to convert images from VMware/VirtualBox/ESXI/HyperV over to KVM. When using it to convert VMware images over to KVM, you may get an error saying no hard disks were found:

Converting VMX files over with virt-v2v requires that you set one of 4 hard disk types:

"disk" | "plainDisk" | "rawDisk" | "scsi-hardDisk"

To find your image’s disk type, you can grep the .vmx file for ".vmdk":

In my case, I only have one disk in this image, and it’s a SCSI disk. Note that “scsi0.0” means that this disk is the first disk on the first SCSI adapter.  Next, you’ll have to echo the disk device type and SCSI bus and disk number into the bottom of the .vmx file so virt-v2v knows how to handle the disk:

And of course, if there are multiple disks, you want to make sure that you echo a similar line in the bottom of the .vmx file for each disk attached to the image. A VM with 3 disks would look like this:

After that change, virt-v2v should be happy:


Leave a Reply