qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qemu-img - vhdx compatibility with Hyper-V


From: Adam Baxter
Subject: Re: qemu-img - vhdx compatibility with Hyper-V
Date: Mon, 23 May 2022 13:29:38 +1000
User-agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27

Hi,

Hit this again and found this thread while searching...

> Shouldn’t specifying -S 0 for qemu-img convert solve the problem?

Doesn't seem to, at least with qemu-img version 7.0.0 
(v7.0.0-11902-g1d935f4a02-dirty)

PS C:\temp> & 'C:\Program Files\qemu\qemu-img.exe' convert -f raw -O vhdx -S 0 
.\jammy-server-cloudimg-amd64.img .\jammy-server-cloudimg-amd64.vhdx

PS C:\temp> fsutil.exe sparse queryFlag .\jammy-server-cloudimg-amd64.vhdx
This file is set as sparse

I've also tried the -S 0 in other places, but this seems to be 'correct' as per 
https://qemu-project.gitlab.io/qemu/tools/qemu-img.html

For anyone else finding this, the command in Windows 10/11 to "fix" the file is 
fsutil.exe sparse setFlag .\jammy-server-cloudimg-amd64.vhdx 0

qemu-img appears to have lost the ability to create old VHD format files, but 
creating a vhd with an older version of qemu-img and using Windows' built in 
Convert-VHD might work, too.

Regards,
Adam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]