Ultimate Guide to Converting Virtual Disks with VBoxManage and Other Tools

  • Complete explanation of virtual disk types: VDI, VHD, VMDK, VHDX, and when to use each one.
  • Detailed steps to convert between formats: using VBoxManage, qemu-img and other handy utilities on Windows and Linux.
  • Comparison of conversion tools: free, manual, and automatic, with real-life examples and use cases.
  • Integration into virtualization environments: VirtualBox, VMware, Hyper-V, Proxmox, and how to migrate between them.

VBoxManage

If you work with virtual machines, you've likely encountered disk formats that don't fit well between different hypervisors. Whether because you downloaded an image in VHDX format but your environment uses VMDK, or because you want to migrate your test lab from VirtualBox to VMware without losing data, converting virtual disks is a common but often poorly documented need. That's where VBoxManage.

This article is a comprehensive guide in which you will learn what tools you can use to Switch between disk types such as VDI, VHD, VHDX, VMDK, QCOW2, and RAW, as well as how to integrate these conversions into environments like VirtualBox, VMware, Hyper-V, KVM, and even Proxmox. All of this is explained with examples, clear steps, and practical advice, using free, cross-platform tools like VBoxManage and qemu-img, or more automated solutions like StarWind or native converters.

Most commonly used virtual disk formats

Virtual disks are not all the same And each virtualization platform works with one or more specific formats. Below, I'll explain each of the most common formats, their advantages, limitations, and where they're used.

VDI (Virtual Disk Image)

VDI is the default format for Oracle VirtualBox, compatible with platforms such as Windows, Linux, macOS, and Solaris. It's flexible, allows for dynamic or fixed-size disks, and supports features such as snapshots and remote access. Although it can be used outside of VirtualBox, Some environments require converting it first.

  • Advantages: good performance, optimized size, high data security.
  • Disadvantages: It does not support incremental backups and is slower than other formats such as VMDK.

VHD and VHDX (Virtual Hard Disk)

Designed by Microsoft for platforms such as Virtual PC and later Hyper-V, the format VHD has a size limit of 2 TB and has been replaced by VHDX, which supports up to 64 TB and greater resilience to unexpected shutdowns. VHDX is ideal for modern Microsoft environments, but requires conversion if intended for use on VMware or other platforms.

  • Advantages: They integrate well with PowerShell, allow snapshots, data recovery, and multi-user separation.
  • Disadvantages: They are more susceptible to corruption than other formats, and in their VHD version they are outdated.

VMDK (Virtual Machine Disk)

VMDK is VMware's native disk format, used in Workstation, Fusion and vSphere/ESXi. It is one of the most versatile formats, since supports complex partitions, incremental snapshots, and thin or thick provisioning. It can also be used in VirtualBox or mounted manually.

  • Advantages: great compatibility, good performance, high security.
  • Disadvantages: requires conversion if used with Hyper-V and some tools split it into multiple files complicating migration.

QCOW2 (QEMU Copy-On-Write)

This format is the storage standard in KVM and Proxmox VE. QCOW2 enables efficient snapshots and compression, being ideal in open source environments.

  • Advantages: space saving, encryption support, snapshots without overhead.
  • Disadvantages: only compatible with QEMU/KVM environments or tools that import it.

Tools to convert virtual disks

To convert disks, there are both basic and versatile command-line tools and automated solutions with a graphical interface. Here's how the main ones work.

VBoxManage

VBoxManage is the VirtualBox CLI console. Allows you to create, modify, and convert virtual disks between VDI, VMDK, and VHD/VHDX. To use it, you must run VBoxManage from the VirtualBox installation directory.

Example to convert VHD to VDI:

VBoxManage clonehd input.vhd output.vdi --format vdi

Example to convert VDI to VMDK:

VBoxManage clonehd input.vdi output.vmdk --format vmdk

The process can also be performed from the VirtualBox Virtual Media Manager if you prefer a graphical interface.

qemu-img

qemu-img is a powerful and open source tool used in Linux and Windows environments to convert between all common virtual disk formats: VHD, VHDX, VMDK, QCOW2, VDI and RAW.

Installation on Linux:

sudo apt-get install qemu-utils

Example to convert from VHDX to VMDK:

qemu-img convert archivo.vhdx -O vmdk archivo.vmdk

On windowsYou can download the portable version of qemu-img and run it from CMD as administrator. The commands are the same. Additionally, if you want to learn more about how to perform these conversions, the article explains in detail how to use VBoxManage: How to convert virtual disks from one format to another (VDI, VMDK, VHD, etc.).

StarWind V2V Converter

StarWind V2V is a free graphical tool for Windows that allows you to convert disk images between VHD, VHDX, VMDK, QCOW2, IMG, among others. Its main advantage is that supports live conversions from Hyper-V to VMware and vice versa.

The guided wizard prompts for the input file and output format, and performs the conversion without touching the original disk. This is very useful for administrators who constantly migrate environments.

VMware Converter Standalone

VMware Converter allows you to convert entire virtual machines Beyond individual disks, it automatically converts powered-on or powered-off VMs in Hyper-V to VMware, even if they're in the cloud. It's a good option for those looking to migrate entire environments seamlessly.

BackupChain V2V

This tool integrates backup and migration options between VMs. Allows you to convert an active Hyper-V virtual machine to a VMDK for use on VMware. It has options to maintain integrity, adjust boot settings, and export disks on demand.

Conversion in Proxmox VE environments

Proxmox uses the QCOW2 format by default. To import discs in other formats, you'll need to convert them to RAW or QCOW2. You can do this directly with commands like:

qm importdisk 200 disco.vmdk local-raid --format raw

You then access the VM from the interface, edit its hardware, and map the imported drive to SATA or SCSI. This is explained step-by-step in many community tutorials due to the popularity of this environment.

Tips for a successful migration

  • Before converting, mount the disk to check its status.. Make sure it contains the correct data and is not corrupted.
  • Always make a backup before starting a conversion.
  • Choose the right disc type: dynamic for testing, fixed for production.
  • Attention drivers: When changing hypervisors, make sure you have the appropriate drivers (such as VMware Tools or QEMU Guest Agent).
  • Preserves boot configuration and firmware (BIOS/UEFI) depending on the source of the VM.
VMWare Workstation Player
Related article:
VMWare Workstation Player, a great application for virtual machines

Add as preferred source