blob: 6c567e914158ded775b36657f4d1ab416d2f412a (
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
|
device: 0.842
mistranslation: 0.832
files: 0.830
PID: 0.812
virtual: 0.795
vnc: 0.742
kernel: 0.741
register: 0.701
socket: 0.701
performance: 0.692
network: 0.662
x86: 0.635
arm: 0.629
VMM: 0.626
ppc: 0.619
permissions: 0.592
architecture: 0.588
hypervisor: 0.583
semantic: 0.575
graphic: 0.572
TCG: 0.514
i386: 0.514
peripherals: 0.513
boot: 0.485
risc-v: 0.474
user-level: 0.409
debug: 0.401
KVM: 0.378
assembly: 0.340
drive_mirror on a resized image creates file with wrong size
Repro steps:
qemu-img create -f qcow2 base 32M
qemu-img create -f qcow2 -o backing_file=base disk
qemu-img resize /home/vishvananda/disk 64M
qemu-system-x86_64 -drive file=disk,id=vda -vnc :1 -monitor stdio
QEMU 1.3.0 monitor - type 'help' for more information
(qemu) drive_mirror vda test
Formatting 'test', fmt=qcow2 size=33554432 backing_file='base' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
the file is 32M instead of 64M:
qemu-img info test
image: test
file format: qcow2
virtual size: 32M (33554432 bytes)
disk size: 196K
cluster_size: 65536
backing file: base
backing file format: qcow2
Workaround is to precreate the new file of the proper size and pass -n
qemu-img create -f qcow2 base 32M
qemu-img create -f qcow2 -o backing_file=base disk
qemu-img resize /home/vishvananda/disk 64M
qemu-img create -f qcow2 -o backing_file=base test 64M
qemu-system-x86_64 -drive file=disk,id=vda -vnc :1 -monitor stdio
QEMU 1.3.0 monitor - type 'help' for more information
(qemu) drive_mirror vda test -n
reformatted patch and submitted upstream:
http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg04584.html
Patch has been included here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=8689907266b649b757c220
... so I think it should be OK to close this bug ticket now.
|