Since Broadcom acquired VMware a few months ago, the license costs of VMware's main product vSphere (ESXi) have more than doubled. Lots of companies (and private individuals) are looking to migrate to a different solution. And there are open source alternatives!
QEMU/KVM is a great alternative to VMware
Proxmox, for example, is a Hypervisor software which relies on pure Open Source Software technology. For containers (lightweight VMs), the LXC project is used, for real Virtual Machine virtualization (needed for Windows for example), the QEMU KVM project is used.
But QEMU/KVM can also be used standalone. Debian and Ubuntu (and derivatives) offer the Virtual Machine Manager (virt-manager) as a GUI tool to manage QEMU VMs.
How to convert virtual disks from vmdk to qcow2
QEMU based virtual machines often use the qcow2 virtual disk format. VMware's virtual machines use the vmdk (virtual machine disk) format. QEMU KVMs can't run a VM with a vmdk disk, but a vmdk can be converted into the qcow2 format.
The magic happens with the qemu-img command, which is installed through the qemu-utils package. In the following example the vmdk of the VMware VM "vm1" is converted from vmdk into the qcow2 format:
ck@mint /vms/vm1 $ qemu-img convert -p -f vmdk -O qcow2 vm1.vmdk /vms/vm1.qcow2
(100.00/100%)
To explain the parameters used:
- -p => Shows the progress of the conversion
- -f => Defines the source format (from), which is vmdk in this case
- -O => Defined the target format (Output), which is qcow2 in this case
Comparing the sizes of the virtual disk does not show a negative impact either, both formats are more or less the same size:
ck@mint /vms/vm1 $ du -h vm1.vmdk
20G vm1.vmdk
ck@mint /vms $ du -h vm1.qcow2
20G vm1.qcow2
The newly created qcow2 virtual disk can now be used for a new (or existing) QEMU KVM.