VMware Import Raw Disk
Problem: I have a raw disk image with bootloader (grub, BIOS) and partitions. I want to import it into a VMware vSphere into a VM and boot from it.
I tried to upload it as is, but just renaming it to *.raw doesn’t help: It doesn’t show in the file explorer.
Convert it with qemu-img to a VMDK file:
qemu-img convert -f raw -O vmdk disk.img disk.vmdk
Didn’t work; when powering on the VM the error is: “Unsupported or invalid disk type 2 for scsi:0:1”
It seems the default is an ide (instead of scsi) disk. Adding the adapter_type was not sufficient. This works for me:
qemu-img convert -f raw -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat,preallocation=full disk.img disk.vmdk
Resulted in two files: disk-flat.vmdk
(identical to raw disk image) and a tiny disk.vmdk
Another trouble: VMware cannot boot from second disk; order needs to be adapted to make this disk the first one.