VMware Cloud
Federal Law Cloud FZ-152

Converting KVM/Xen Virtual Disks to VMware Format Using QEMU

One method for migrating to an ESXi (VMware) hypervisor involves converting KVM or Xen disks using the qemu-img disk utility, which is part of the QEMU virtualization system (download distributions here).

Conversion Command

Execute the following command with the specified parameters:

qemu-img convert -f qcow2 -O vmdk -o adapter_type=lsilogic,subformat=streamOptimized,compat6 xen-or-kvm-disk.qcow2 converted-disk.vmdk

Prerequisites:

  • The source disk must be in qcow2 format

  • The virtual machine using this disk must be powered off

 

Post-Conversion Steps

  1. Copy the converted disk to your ESXi host

  2. Use VMware's disk management utility to optimize the disk:

vmkfstools -i converted-disk.vmdk my-new-vm-disk.vmdk -d thin

Important Notes:

  1. Xen Paravirtualization:
    If migrating from Xen, the VM might be in paravirtualization mode, requiring a kernel replacement to run on ESXi.

  2. Fedora/RHEL/CentOS Migration:
    These distributions store disk UUIDs in initramfs. If needed, regenerate it in rescue mode by executing: dracut --regenerate-all --force

 

Have you tried Cloud4U services? Not yet?

Visit Website

Try for free

Scroll up!