Convert .qcow2 file to .vhd or .vhdx

Recently we had a ProxMox environment crash and needed to restore some files inside a VM. We did not want to rebuild the Proxmox environment and could access the virtual harddisk files used by Proxmox, in this case .qcow2 files.

There is a nice tool available to convert these files to convienent .vhdx files so you can browse the virtual harddisks within Windows.

Downlad the software:
https://cloudbase.it/downloads/qemu-img-win-x64-2_3_0.zip

Extrac the files and open an elevated powershell windows in this folder.

Run the folowing command where c:\iterrors\vm-123-disk1.qcow2 is your source file and c:\iterrors\vm123.vhdx is your destination file.

qemu-img.exe convert c:\iterrors\vm-123-disk-1.qcow2 -O vhdx -o subformat=dynamic vm123.vhdx

Depending on the size of your .qcow2 file it could take a while to complete.

Source:

qemu-img for Windows