Loading...

We've detected that your browser language is Chinese. Would you like to visit our Chinese website? [ Dismiss ]
By: Emma

What Are QCOW2 & OVA and Why Convert

KVM and VMware use incompatible disk image formats. QCOW2 (QEMU Copy-On-Write) is the native format for KVM hypervisors, while VMware requires OVA — a single-file package containing the virtual disk (VMDK), machine configuration (OVF descriptor), and a manifest file.

Most teams run into this when moving VMs from a KVM setup to VMware, either to take advantage of VMware’s management tools or to consolidate infrastructure onto a single platform.

But there is no single command that handles this conversion directly. The process involves two stages: converting the disk format first, then packaging the result into an OVF-compliant archive.

This guide covers both stages for Linux and Windows, along with the most common errors that cause migrations to fail.

convert qcow2 to ova

Before You Start: Pre-Conversion Checklist

Skipping preparation is the most common reason VMs fail to boot after conversion. There are three things to check before converting QOCW2 to OVA: the tools on your host machine, the drivers inside the guest OS, and the boot mode of the source VM.

Host machine requirements

Make sure the following are in place before running any commands:

  • qemu-img installed on the machine you will use for disk conversion
  • VMware OVF Tool downloaded and installed for packaging the final archive
  • Administrative access to the target ESXi or vCenter environment
  • Enough disk space for three files: the original QCOW2, the intermediate VMDK, and the final OVA

Guest drivers

KVM virtual machines use VirtIO drivers for storage and networking. VMware does not recognize these, so the guest OS needs the correct drivers installed before conversion.

  • Linux guests: Install open-vm-tools via your package manager before taking the final snapshot.
  • Windows guests: Install the virtio-win drivers first, then add VMware Tools after the import completes.

Boot mode

Check whether the source VM uses UEFI or legacy BIOS. The target VM in VMware needs to be configured to match. A mismatch here will prevent the operating system from starting after import.

How to Convert QCOW2 to OVA on Linux

Linux provides native support for all the tools needed for this process. The conversion runs in two stages: transforming the disk format with qemu-img, then packaging the result into an OVA using VMware OVF Tool.

Step 1: Convert QCOW2 to VMDK with qemu-img

Install qemu-img through your distribution’s package manager.

For Ubuntu or Debian:

bash
sudo apt update && sudo apt install qemu-utils

For RHEL, CentOS, or Fedora:

bash
sudo yum install qemu-img

Once installed, run the conversion:

bash
qemu-img convert -f qcow2 -O vmdk source_image.qcow2 destination_disk.vmdk
  • -f qcow2: specifies the source format
  • -O vmdk: specifies the output format

The result is a VMware-compatible virtual disk. This file alone is not an OVA — it still needs to be imported into ESXi and packaged in the next steps.

Step 2: Import the VMDK into VMware ESXi

Upload the converted VMDK to your ESXi datastore, then build a VM around it.

  1. Log in to the ESXi host and go to Storage.
  2. Open the Datastore Browser and upload the VMDK file.
  3. Create a New Virtual Machine and select Custom configuration.
  4. Match the CPU, RAM, and network settings to the original KVM source.
  5. At the disk selection step, choose Use an existing virtual disk and select the uploaded VMDK.
  6. Under Boot Options, confirm the BIOS or UEFI setting matches the source VM.

Boot the VM and verify it starts correctly before moving to the next step.

Step 3: Export the VM as OVA Using OVF Tool

Once the VM is confirmed to boot in ESXi, use OVF Tool to package it. This step bundles the VMDK and OVF descriptor into a single portable archive, making the image ready for cloning or distribution.

Run the following command against your ESXi host or vCenter:

bash
ovftool vi://username:password@esxi_ip/vm_name output_appliance.ova

Replace esxi_ip with your host’s IP address and vm_name with the name of the virtual machine as it appears in ESXi.

For large-scale migrations involving multiple VMs, V2V migration tools can simplify the process considerably.

Step 4: Verify the OVA

Run a probe check to confirm the archive is valid before deploying it:

bash
ovftool --probe output_appliance.ova

If the command returns no errors, the OVA is ready to use. This catches issues like truncated files or malformed OVF descriptors before they cause problems in production.

How to Convert QCOW2 to OVA on Windows

Run the Conversion

The conversion command is the same as on Linux. On Windows, use double quotes around any path that contains spaces:

powershell
qemu-img.exe convert -f qcow2 -O vmdk "C:\Source VMs\image.qcow2" "C:\Target VMs\disk1.vmdk"
  • -f qcow2: specifies the source format
  • -O vmdk: specifies the output format

Once the conversion finishes, upload the VMDK to your ESXi datastore and configure it as a virtual machine, following the same steps covered in the Linux section above.

Install and Run OVF Tool on Windows

Download the OVF Tool Windows MSI installer from the VMware website and follow the installation prompts.

Once the VM is running in ESXi, use OVF Tool to package it as an OVA:

powershell
& "C:\Program Files\VMware\VMware OVF Tool\ovftool.exe" vi://root@192.168.1.10/MyMigratedVM "C:\Exports\MyVM.ova"

The & operator tells PowerShell to execute a program at a path that contains spaces. Without it, PowerShell treats the path as a string and the command fails.

Common QCOW2 to OVA Conversion Errors and Fixes

Most conversion failures happen at one of two points: during the disk transformation, or when the VM first boots in VMware. The fixes below cover the most common causes.

VM won’t boot after import

A black screen or “No bootable device” error usually means the firmware setting in VMware does not match the source KVM VM. Go to VM Options > Boot Options and confirm the Firmware is set to match the source (UEFI or Legacy BIOS). If the OS still fails to load, check that the SCSI controller type in VMware is compatible with the drivers installed in the guest.

streamOptimized VMDK causing qemu-img to fail

qemu-img does not fully support the streamOptimized subformat used by some VMware appliances. Add the -o subformat=monolithicSparse flag to convert to a standard monolithic sparse VMDK instead. If a streamOptimized output is specifically required, use OVF Tool to handle that format during the final export step.

Permission errors on Linux

A “Permission denied” error usually means the current user lacks read access to the QCOW2 file or write access to the destination directory. Run ls -l to check ownership, apply chmod 644 to the source file if needed, and confirm the destination directory is writable by your current user.

LVM or GPT partitions not recognized after import

Disk size rounding during conversion can cause partition alignment issues, particularly with GPT partition tables. Set the target disk size in VMware to match the exact byte count of the source image. If partitions are still not recognized, boot from a Live ISO and use gdisk to repair the GPT headers.

Windows path spaces causing conversion errors

Spaces in folder names are treated as argument separators by the command line, which causes an “Unexpected argument” error. Wrap all file paths in double quotes, for example "C:\VM Storage\image.qcow2".

Protect Your VMware Environment After Migration: i2Backup

Getting a VM into VMware is only half the job. Once the converted machine is running, it needs ongoing protection against accidental deletion, corruption, and hardware failure. The OVA file you created during migration is a point-in-time snapshot, not a backup strategy.

i2Backup fills that gap with agentless VM backup for VMware and other mainstream virtualization platforms. There is no agent to install inside the guest OS, and backups run without any impact on production workloads.

Key features relevant to VMware environments:

  • Agentless VM backup: Connects directly to VMware via native platform APIs, protecting VMs across ESXi and vCenter without touching the guest OS.
  • Instant VM recovery: Remotely mounts a VM backup to the target platform for near-immediate recovery, keeping downtime to a minimum.
  • File-level recovery: Restores individual files or folders from a backup without recovering the entire VM.
  • Point-in-time recovery: Uses continuous backup logs and multiple restore points to recover from accidental deletion or data corruption at any point.
  • Centralized management: A web-based console handles backup scheduling, real-time status monitoring, and alerts across all protected environments.

For environments where uptime is critical, i2Availability extends protection further with real-time replication and automated failover, keeping applications running even when a host goes down. If your migration also involves ongoing database replication across platforms, i2Stream handles real-time database sync with support for Oracle, MySQL, SQL Server, and other mainstream systems.

FREE Trial for 60-Day
If you want to explore how i2Backup handles VM protection in your environment, a 60-day free trial is available. You can also reach out to the Info2soft team if you have questions about your specific setup.

FAQ

Q1: Can I convert QCOW2 to OVA directly?

No. OVA is a package format, not a disk image format, so there is no single command that handles the full conversion. The process requires converting the virtual disk to VMDK first, then bundling it with the necessary metadata using OVF Tool.

 

Q2: Does qemu-img support OVA output?

No. qemu-img handles virtual disk formats only, such as VMDK, RAW, and VHDX. It cannot generate the OVF descriptor files that define a virtual appliance. OVF Tool handles that step.

 

Q3: How do I convert QCOW2 to OVA on Windows?

Use the Windows build of qemu-img to convert the QCOW2 file to VMDK, upload the disk to an ESXi host, then use the Windows version of OVF Tool to export the VM as an OVA archive. The commands are the same as Linux; the main difference is path syntax and how you call the executables.

 

Q4: What’s the difference between OVA and OVF?

OVF (Open Virtualization Format) is a set of separate files: a descriptor file, the virtual disk, and a manifest. OVA (Open Virtualization Archive) packages all of those files into a single compressed archive for easier distribution and portability.

 

Q5: Why won’t my VM boot after converting to OVA?

The most common cause is a firmware mismatch. Check that the target VM in VMware is configured to use the same boot mode as the source, either Legacy BIOS or UEFI. Missing guest drivers are another frequent cause, which is why installing open-vm-tools or virtio-win before conversion is recommended.

Conclusion

Converting a QCOW2 image to OVA is a multi-step process, but each stage serves a clear purpose. qemu-img handles the disk format conversion, ESXi gives the VM a working environment, and OVF Tool packages everything into a portable archive. Getting the boot mode and guest drivers right before you start will prevent most of the errors that cause migrations to fail.

Once the VM is running in VMware, the next step is making sure it stays protected. The OVA you created is a starting point, not a safety net. Setting up regular agentless backups with Inf2soft’s i2Backup ensures you have clean recovery points from day one.

For teams managing larger environments, it is also worth reviewing how you backup your ESXi configuration alongside your VMs. Losing host-level settings during a failure can be just as disruptive as losing the workloads themselves.

Emma is the bridge between complex engineering and the people who need it. As a content creator at Info2Soft, she spends her days translating "tech-speak" into clear, actionable stories about data resilience. She’s not just documenting software; she's uncovering how data replication and recovery actually change the way businesses run.

More Related Articles

Table of Contents:
Stay Updated on Latest Tips
Subscribe to our newsletter for the latest insights, news, exclusive content. You can unsubscribe at any time.
Subscribe
Ready to Enhance Business Data Security?
Start a 60-day free trial or view demo to see how Info2soft protects enterprise data.
{{ country.name }}
Please fill out the form and submit it, our customer service representative will contact you soon.
By submitting this form, I confirm that I have read and agree to the Privacy Notice.
{{ isSubmitting ? 'Submitting...' : 'Submit' }}