blob: 2140c91ab31bb75a4dd6be5cfc89e47a11bb297f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
qemu-img convert qcow2 to raw fails on OS X
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://github.com/coreos/bugs/issues/1121#issuecomment-351968518
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://beta.release.core-os.net/amd64-usr/current/coreos_production_openstack_image.img.bz2
$ date
Fri Dec 14 17:15:57 CET 2017
$ bunzip2 coreos_production_openstack_image.img.bz2
$ cp -a coreos_production_openstack_image.img.org coreos_production_openstack_image.img
$ shasum coreos_production_openstack_image.img.org
ae2119c6f0390dc36f247f7016923ea85de5d8e6 coreos_production_openstack_image.img.org
$ qemu-img convert -f qcow2 -O raw coreos_production_openstack_image.img.org coreos_production_openstack_image.bin
$ qemu-system-x86_64 -m 256 -nographic -hda coreos_production_openstack_image.img -boot c
SeaBIOS (version rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org)
iPXE (http://ipxe.org) 00:03.0 C980 PCI2.10 PnP PMM+0FF915A0+0FEF15A0 C980
Booting from Hard Disk...
GRUB loading....
Welcome to GRUB!
....
$ qemu-system-x86_64 -m 256 -nographic -hda coreos_production_openstack_image.bin -boot c
SeaBIOS (version rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org)
iPXE (http://ipxe.org) 00:03.0 C980 PCI2.10 PnP PMM+0FF915A0+0FEF15A0 C980
Booting from Hard Disk...
Boot failed: not a bootable disk
....
$ head -c 8192 coreos_production_openstack_image.bin | hexdump -C
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00002000
$ qemu-img info coreos_production_openstack_image.bin
image: coreos_production_openstack_image.bin
file format: raw
virtual size: 8.5G (9116319744 bytes)
disk size: 217M
$ qemu-img info coreos_production_openstack_image.img
image: coreos_production_openstack_image.img
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.
|