HostOnNet Blog

Convert KVM, VMWare virtual machine to Hyper-V

QEMU disk image utility (qemu-img) can be used to convert virtual machine disk from one format to another.

https://linux.die.net/man/1/qemu-img

QEMU is part of Linux KVM virtual machine.

To convert KVM Virtual machine image to Hyper-V format, run

qemu-img convert -f qcow2 “kvm-virtal-machine.img” -O vhdx -o subformat=dynamic “hyperv-virtual-machine.vhdx”

To convert VMware image to Hyper-V

qemu-img convert -f vmdk "vmware-virtal-machine.vmdk” -O vhdx -o subformat=dynamic hyperv-virtual-machine.vhdx”

Create A Virtual Machine Image

To create a 10 GB virtual machine image with qcow2 format, run

qemu-img create -f qcow2 /home/virt/images/del/disk.img 10G

Disk image with 10 GB size will be created at /home/virt/images/del/disk.img.


Posted in Virtualization