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
87
88
89
90
91
92
93
94
95
96
|
peripherals: 0.909
socket: 0.886
permissions: 0.874
hypervisor: 0.856
device: 0.849
graphic: 0.830
debug: 0.829
PID: 0.821
assembly: 0.810
files: 0.807
boot: 0.798
register: 0.777
semantic: 0.777
user-level: 0.766
network: 0.759
architecture: 0.757
arm: 0.740
virtual: 0.728
i386: 0.721
performance: 0.721
risc-v: 0.702
kernel: 0.701
TCG: 0.689
mistranslation: 0.660
x86: 0.645
vnc: 0.623
ppc: 0.601
VMM: 0.573
KVM: 0.534
qemu-img conversion to qcow2 hangs with blank image less than 100kiB
If you try to convert a blank image to qcow2 that is less than 100kiB in size then qemu-img hangs trying to seek to the end of the file.
$ truncate --size 102399 /tmp/temp
$ qemu-img convert -p -O qcow2 /tmp/temp /tmp/temp2.qcow2
I'm finding this on all versions of qemu-img v2.
strace shows a seek loop.
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ioctl(6, FS_IOC_FIEMAP, 0xb5e68dc4) = 0
_llseek(6, 0, [100000], SEEK_END) = 0
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: qemu-utils 2.0.0+dfsg-2ubuntu1.10
ProcVersionSignature: User Name 3.13.0-43.72-generic 3.13.11.11
Uname: Linux 3.13.0-43-generic i686
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: i386
Date: Tue Jan 13 14:30:39 2015
SourcePackage: qemu
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.
Workaround is to 'fallocate'. Problem seems to be linked to files with sparse holes in them.
verified this fails as described on vivid:
$ dpkg-query --show qemu-utils
qemu-utils 1:2.1+dfsg-11ubuntu1
and also on trusty.
$ dpkg-query --show qemu-utils
qemu-utils 2.0.0+dfsg-2ubuntu1.10
Does it also fail with the qemu from
https://launchpad.net/~ubuntu-virt/+archive/ubuntu/virt-daily-upstream ?
(This isn't quite git head, but it is qemu v2.2)
Went ahead and tested - it is in fact fixed in the v2.2 version.
qemu is 2.5 in 16.04 and 2.6.1 in Zesty, so this is presumably Fix Released now. If incorrect, please explain and reopen.
|