qemu-img convert qcow2 to raw fails on OS X
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
New
|
Undecided
|
Unassigned |
Bug Description
I try to convert a image from qcow2 to raw and the result is a not bootable image.
I dont know if it is a bug in qemu-img convert or with the image it self.
See this error report for better readability:
https:/
As a reply here they use 2.9.0 version of
$ qemu-img -V
qemu-img version 2.11.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
$ uname -v
Darwin Kernel Version 17.2.0
$ mount ./
/dev/disk1s1 on / (apfs, local, journaled)
$ wget https:/
$ date
Fri Dec 14 17:15:57 CET 2017
$ bunzip2 coreos_
$ cp -a coreos_
$ shasum coreos_
ae2119c6f0390dc
$ qemu-img convert -f qcow2 -O raw coreos_
$ qemu-system-x86_64 -m 256 -nographic -hda coreos_
SeaBIOS (version rel-1.11.
iPXE (http://
Booting from Hard Disk...
GRUB loading....
Welcome to GRUB!
....
$ qemu-system-x86_64 -m 256 -nographic -hda coreos_
SeaBIOS (version rel-1.11.
iPXE (http://
Booting from Hard Disk...
Boot failed: not a bootable disk
....
$ head -c 8192 coreos_
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00002000
$ qemu-img info coreos_
image: coreos_
file format: raw
virtual size: 8.5G (9116319744 bytes)
disk size: 217M
$ qemu-img info coreos_
image: coreos_
file format: qcow2
virtual size: 8.5G (9116319744 bytes)
disk size: 785M
cluster_size: 65536
Format specific information:
compat: 0.10
refcount bits: 16
The same version works on Ubuntu so it looks like its only the Mac version or the new APFS filesystem.
We've had APFS bugs before, if memory serves... perhaps something to do with sparse gap handling?
Do you have the ability to take a "good" conversion of the qcow2 file (made on a non-APFS partition) and compare it against the "bad" conversion?
Highlighting the differences might inspire some ideas as to where this has gone wrong, but at present I don't have an OSX computer to test this with, personally.