How to Convert OVA to Qcow2 Format for KVM?
2022-12-25 | Viego
Hypervisor makes server have better work efficiency and that's why more and more companies chose virtual environment. In the market, there are many kinds of hypervisors, like VMware ESXi, KVM, Xen, etc. For IT administrators, it is necessary to know more than one kind of virtualization technology because heterogeneous virtualization becomes increasingly popular.
Heterogeneous virtual environment means two or more virtualization solutions are adopted. IT administrators install different hypervisors on servers and create different virtual machines. Because of different technology, different servers can not be connected and share data easily. When it is needed to migrate data or entire virtual machine, IT administrators often need to use V2V converter to make the source data be able to be imported to the destination server.
In this post, you will know the way to convert OVA to qcow2 to migrate from VMware to KVM.
OVA is a zipped file which contains the whole VM data including configuration, applications, etc. Generally speaking, it contains 3 parts of data, metadata, virtual hard disks, and snapshots. Usually, you just need the data of virtual hard disks.
VMware virtual hard disks are the .vmdk files in the folder, while on KVM platforms, virtual hard disks are often stored as .qcow2 files, so IT administrators need to convert the format of VMware virtual hard disks to import data to KVM platform.
How to get the VOA file from VMware?
OVA file cannot be exported in vCenter now. You can download VOF Tool from VMware to export OVA file. It will also be convenient to export and deploy large VM.
The commands to export OVA are as follows,
ovftool -o \
"vi://username:password@vcenter/datecenter /vm/vmName" /root/vmName.ova
How to convert OVA to qcow2 with qemu-img?
As mentioned before, OVA contains many kinds of files of VMware VM, but qcow2 is just the virtual hard disk file of KVM VM, so you also just need to convert the virtual hard disk of VMware VM.
The virtual hard disk format of VMware VM is .vmdk. When you get the OVA file, you can unzip it to get the .vmdk file.
On Windows machine, you can download an unzip software to extract the .vmdk file.
On Linux machine, you just need to unzip it with command: tar -xvf guest_machine.ova
qemu-img convert -p -f vmdk -O qcow2 guest_machine.vmdk guest_machine.qcow2
Now, you can use the qcow2 file on your KVM virtual machine.
How to convert VM in an easier way?
It might be interesting to know the structures of different platforms and convert the format for another platform when time is enough, but to build a highly efficient management system for IT environment, you need a more powerful tool.
Vinchin Backup & Recovery is a professional backup and disaster recovery solution which supports multiple virtualization platforms like like VMware vSphere, OLVM, RHV/oVirt, Openstack, etc.,(Native KVM is not supported for now) into backup system for centralized management.
When it is needed to migrate virtual machine between different platforms, Vinchin Virtual Machine Convert Engine will help you convert related files. You just need to select the source VM and the target host. It is much faster than converting and importing virtual hard disk.
Apart from cross-platform recovery, Vinchin Backup & Recovery can also help decrease downtime with Instant Recovery, which lets you recover a failed VM from its backup in 15 seconds.
You can have a 60-day full-featured free trial offer to build a highly efficient backup system. It takes just several minutes to deploy the software. Just click the button to get the installation package.
The popular hypervisors include VMware ESXi, KVM, Xen, etc. Because different technologies are used in different solutions, when it is needed to migrate data to another platform, IT administrators need to convert the source data.
In this post, you have known what is OVA file in VMware and qcow2 in KVM and the way to convert OVA file to qcow2 to let it work on KVM platform.
You can choose Vinchin Backup & Recovery to save much time in converting files and recovering failed VMs. Don't miss the free trial.
Thanks for subscribing! A confirmation mail has been sent to your mailbox, please check within 48 hours.