VMware Cloud Community
Thonar
Contributor
Contributor

Migrating from KVM to VMware

As the title says, we want to migrate our VMs from KVM to VMware. The steps we follow:

  1. convert the VM image (qemu-img convert -f raw -O vmdk vm1.qcow2 vm1.vmdk)
  2. scp the converted image to the ESX datastore (scp vm1.vmdk esx1:/vmfs/volumes/datastore1/)
  3. clone the disk using vmkfstools (vmkfstools -i vm1.vmdk vm1-cloned.vmdk -d thin)
  4. create a new VM using the existing, cloned disk

So far, this has worked only with our Windows VMs. The Linux VMs cannot boot (Operating System not found) because the VM cannot find the disk. I have tried pretty much every configuration combination I could think of (BIOS/EFI, LSI Logic SAS/VMware Paravirtual) with no success. The Linux VMs are CentOS 8 systems with open-vm-tools already installed. The hypervisor is VMware ESXi, 7.0.0, 16324942.

Any help is greatly appreciated.

Reply
0 Kudos
6 Replies
Alex_Romeo
Leadership
Leadership

Hi,

double check all the steps in this post:

https://possiblelossofprecision.net/?p=2293

https://blog.ktz.me/migrate-qcow2-images-from-kvm-to-vmware/

ARomeo

Blog: https://www.aleadmin.it/
lgag_co
Contributor
Contributor

Hi, 

Just wondering, where you able to conver linux KVM to vmware?

 

Rgds 

Luis 

Reply
0 Kudos
e_espinel
Virtuoso
Virtuoso

Hello.
I suggest something more practical and safe.
1. Perform a full Backup (Image) of each VM with Veeam Backup (Requires a PC or VM with disk space, where the Veeam Backup Server is installed).
2. Configure the ESXi host as a virtual structure in Veeam Backup and perform an install recovery of each VM.

Attached is a link to the Veeam Backup Community (Free) and an example of how to backup physical servers and restore them to ESXi with Veeam Backup.

https://www.veeam.com/virtual-machine-backup-solution-free.html

https://community.veeam.com/vug-hong-kong-and-macau-81/physical-to-virtual-migration-with-veeam-2166

Working with Veeam Backup is quite easy and intuitive. On the web there are many videos and tutorials about veeam backup.

 

 

Enrique Espinel
Senior Technical Support on IBM, Lenovo, Veeam Backup and VMware vSphere.
VSP-SV, VTSP-SV, VTSP-HCI, VTSP
Please mark my comment as Correct Answer or assign Kudos if my answer was helpful to you, Thank you.
Пожалуйста, отметьте мой комментарий как Правильный ответ или поставьте Кудо, если мой ответ был вам полезен, Спасибо.
Reply
0 Kudos
CCPR-Jose
Contributor
Contributor

Just saw this, thought I might share some info.

It seems KVM uses different storage drivers than VMWare, so you might need to rebuild the initramfs file in the /boot directory. You will need an RHEL/OEL/Centos install disc (ISO) and use the rescue mode to drop to a shell, backup the current file and recreate it. The dracut command will detect the new environment and add the necessary drivers to the file.

I dont remember the steps from the top of my head, but I hope this points you in the right direction.

Reply
0 Kudos
enigmaedge
Contributor
Contributor

Did you ever get ahead with this issue?

Reply
0 Kudos
Thyss
Contributor
Contributor

100 % free workaround :

The only solution i've got so far with debian12 guest OS on KVM to make it work for importing the ova into vsphere :

1. Convert into the qcow2 into vdi first with qemu-img.

2. Import VM into Oracle VirtualBox and change disk into LSI (SCSI)

3. Export new VM with VirtualBox and import into Vmware Workstation Pro ( if you have the money i bet you will find a better solution with vsphere)

4. Export the vm with VmWare Workstation pro, and extract the files to get a new corrected manifest with ovftools (Get-FileHash powershell with the files before redoing an ova)

Somehow, the extraction with ESXi7 compatibility isn't working directly for importing the ova into vsphere.

(delete all network cards in between before importing the .ova into vsphere ).

Regards,

 

Reply
0 Kudos