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:
I ran the command above. it created 1 file – the vhdx file. I tried to import it to Windows but it says it couldn’t find virtual machines to import.
That’s because the QCOW2 isn’t a VM image, it’s just the virtual disk, and in this case it’s been converted to another virtual disk. You have to create a new VM and use the disk with it.
Exporting/Importing VMs is a different process than this.