xref: /qemu/tests/qemu-iotests/153.out (revision 0e720781)
1ba898078SFam ZhengQA output created by 153
2ba898078SFam Zheng== readonly=off,force-share=on should be rejected ==
3ba898078SFam ZhengQEMU_PROG: -drive if=none,file=null-co://,readonly=off,force-share=on: force-share=on can only be used with read-only images
4ba898078SFam Zheng
5ba898078SFam Zheng== Creating base image ==
6ba898078SFam ZhengFormatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432
7ba898078SFam Zheng
8ba898078SFam Zheng== Creating test image ==
9b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
10ba898078SFam Zheng
11ba898078SFam Zheng== Launching QEMU, opts: '' ==
12ba898078SFam Zheng
13ba898078SFam Zheng== Launching another QEMU, opts: '' ==
14ba898078SFam ZhengQEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock
15b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
16ba898078SFam Zheng
17ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on' ==
18ba898078SFam ZhengQEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,read-only=on: Failed to get shared "write" lock
19b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
20ba898078SFam Zheng
21ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on,force-share=on' ==
22ba898078SFam Zheng
23ba898078SFam Zheng== Running utility commands  ==
24ba898078SFam Zheng
25ba898078SFam Zheng_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2
2636b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
27b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
28ba898078SFam Zheng
29ba898078SFam Zheng_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
3036b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock
31b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
32ba898078SFam Zheng
33ba898078SFam Zheng_qemu_io_wrapper -c open  TEST_DIR/t.qcow2 -c read 0 512
3436b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
35b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
3664ebf556SEric Blakeno file open, try 'help open'
37ba898078SFam Zheng
38ba898078SFam Zheng_qemu_io_wrapper -c open -r  TEST_DIR/t.qcow2 -c read 0 512
3936b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock
40b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
4164ebf556SEric Blakeno file open, try 'help open'
42ba898078SFam Zheng
43ba898078SFam Zheng_qemu_img_wrapper info TEST_DIR/t.qcow2
44ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
45b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
46ba898078SFam Zheng
47ba898078SFam Zheng_qemu_img_wrapper check TEST_DIR/t.qcow2
48ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
49b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
50ba898078SFam Zheng
51ba898078SFam Zheng_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
52ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
53b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
54ba898078SFam Zheng
55ba898078SFam Zheng_qemu_img_wrapper map TEST_DIR/t.qcow2
56ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
57b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
58ba898078SFam Zheng
5944e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M TEST_DIR/t.qcow2
60ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
61b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
62ba898078SFam Zheng
63ba898078SFam Zheng_qemu_img_wrapper commit TEST_DIR/t.qcow2
64ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
65b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
66ba898078SFam Zheng
67ba898078SFam Zheng_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M
68ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
69b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
70ba898078SFam Zheng
71b66ff2c2SEric Blake_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
72ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
73b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
74ba898078SFam Zheng
75ba898078SFam Zheng_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2
76ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
77b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
78ba898078SFam Zheng
79ba898078SFam Zheng_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
80ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
81b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
82ba898078SFam Zheng
83ba898078SFam Zheng_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
84ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
85b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
86ba898078SFam Zheng
87ba898078SFam Zheng_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2
88ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get shared "write" lock
89b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
90ba898078SFam Zheng
91ba898078SFam Zheng_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2
92ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
93b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
94ba898078SFam Zheng
95b66ff2c2SEric Blake_qemu_img_wrapper create -f qcow2 TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
96f45b638fSMax Reitzqemu-img: TEST_DIR/t.qcow2: Failed to get "write" lock
97b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
98f45b638fSMax Reitzfile format: IMGFMT
99b66ff2c2SEric Blakebacking file format: IMGFMT
100f45b638fSMax Reitz
101ba898078SFam Zheng== Running utility commands -U ==
102ba898078SFam Zheng
103ba898078SFam Zheng_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2
10436b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
105ba898078SFam Zheng
106ba898078SFam Zheng_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
107ba898078SFam Zheng
108ba898078SFam Zheng_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
10936b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
11064ebf556SEric Blakeno file open, try 'help open'
111ba898078SFam Zheng
112ba898078SFam Zheng_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
113ba898078SFam Zheng
114ba898078SFam Zheng_qemu_img_wrapper info -U TEST_DIR/t.qcow2
115ba898078SFam Zheng
116ba898078SFam Zheng_qemu_img_wrapper check -U TEST_DIR/t.qcow2
117ba898078SFam Zheng
118ba898078SFam Zheng_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
119ba898078SFam Zheng
120ba898078SFam Zheng_qemu_img_wrapper map -U TEST_DIR/t.qcow2
121ba898078SFam Zheng
12244e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M -U TEST_DIR/t.qcow2
123ba898078SFam Zhengqemu-img: unrecognized option '-U'
124ba898078SFam ZhengTry 'qemu-img --help' for more information
125ba898078SFam Zheng
126ba898078SFam Zheng_qemu_img_wrapper commit -U TEST_DIR/t.qcow2
127ba898078SFam Zhengqemu-img: unrecognized option '-U'
128ba898078SFam ZhengTry 'qemu-img --help' for more information
129ba898078SFam Zheng
130ba898078SFam Zheng_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M
131ba898078SFam Zhengqemu-img: unrecognized option '-U'
132ba898078SFam ZhengTry 'qemu-img --help' for more information
133ba898078SFam Zheng
134b66ff2c2SEric Blake_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
135ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
136b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
137ba898078SFam Zheng
138ba898078SFam Zheng_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2
139ba898078SFam Zheng
140ba898078SFam Zheng_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
141ba898078SFam Zheng
142ba898078SFam Zheng_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
143ba898078SFam Zheng
144ba898078SFam Zheng_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2
145ba898078SFam Zheng
146ba898078SFam Zheng_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2
147ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images
148a98b1a1fSEric Blake{ 'execute': 'quit' }
149ba898078SFam Zheng
150ba898078SFam ZhengRound done
151ba898078SFam Zheng
152ba898078SFam Zheng== Creating base image ==
153ba898078SFam ZhengFormatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432
154ba898078SFam Zheng
155ba898078SFam Zheng== Creating test image ==
156b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
157ba898078SFam Zheng
158ba898078SFam Zheng== Launching QEMU, opts: 'read-only=on' ==
159ba898078SFam Zheng
160ba898078SFam Zheng== Launching another QEMU, opts: '' ==
161ba898078SFam ZhengQEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock
162b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
163ba898078SFam Zheng
164ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on' ==
165ba898078SFam Zheng
166ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on,force-share=on' ==
167ba898078SFam Zheng
168ba898078SFam Zheng== Running utility commands  ==
169ba898078SFam Zheng
170ba898078SFam Zheng_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2
17136b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
172b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
173ba898078SFam Zheng
174ba898078SFam Zheng_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
175ba898078SFam Zheng
176ba898078SFam Zheng_qemu_io_wrapper -c open  TEST_DIR/t.qcow2 -c read 0 512
17736b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
178b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
17964ebf556SEric Blakeno file open, try 'help open'
180ba898078SFam Zheng
181ba898078SFam Zheng_qemu_io_wrapper -c open -r  TEST_DIR/t.qcow2 -c read 0 512
182ba898078SFam Zheng
183ba898078SFam Zheng_qemu_img_wrapper info TEST_DIR/t.qcow2
184ba898078SFam Zheng
185ba898078SFam Zheng_qemu_img_wrapper check TEST_DIR/t.qcow2
186ba898078SFam Zheng
187ba898078SFam Zheng_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
188ba898078SFam Zheng
189ba898078SFam Zheng_qemu_img_wrapper map TEST_DIR/t.qcow2
190ba898078SFam Zheng
19144e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M TEST_DIR/t.qcow2
192ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
193b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
194ba898078SFam Zheng
195ba898078SFam Zheng_qemu_img_wrapper commit TEST_DIR/t.qcow2
196ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
197b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
198ba898078SFam Zheng
199ba898078SFam Zheng_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M
200ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
201b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
202ba898078SFam Zheng
203b66ff2c2SEric Blake_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
204ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
205b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
206ba898078SFam Zheng
207ba898078SFam Zheng_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2
208ba898078SFam Zheng
209ba898078SFam Zheng_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
210ba898078SFam Zheng
211ba898078SFam Zheng_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
212ba898078SFam Zheng
213ba898078SFam Zheng_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2
214ba898078SFam Zheng
215ba898078SFam Zheng_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2
216ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
217b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
218ba898078SFam Zheng
219b66ff2c2SEric Blake_qemu_img_wrapper create -f qcow2 TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
220f45b638fSMax Reitzqemu-img: TEST_DIR/t.qcow2: Failed to get "write" lock
221b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
222f45b638fSMax Reitzfile format: IMGFMT
223b66ff2c2SEric Blakebacking file format: IMGFMT
224f45b638fSMax Reitz
225ba898078SFam Zheng== Running utility commands -U ==
226ba898078SFam Zheng
227ba898078SFam Zheng_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2
22836b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
229ba898078SFam Zheng
230ba898078SFam Zheng_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
231ba898078SFam Zheng
232ba898078SFam Zheng_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
23336b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
23464ebf556SEric Blakeno file open, try 'help open'
235ba898078SFam Zheng
236ba898078SFam Zheng_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
237ba898078SFam Zheng
238ba898078SFam Zheng_qemu_img_wrapper info -U TEST_DIR/t.qcow2
239ba898078SFam Zheng
240ba898078SFam Zheng_qemu_img_wrapper check -U TEST_DIR/t.qcow2
241ba898078SFam Zheng
242ba898078SFam Zheng_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
243ba898078SFam Zheng
244ba898078SFam Zheng_qemu_img_wrapper map -U TEST_DIR/t.qcow2
245ba898078SFam Zheng
24644e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M -U TEST_DIR/t.qcow2
247ba898078SFam Zhengqemu-img: unrecognized option '-U'
248ba898078SFam ZhengTry 'qemu-img --help' for more information
249ba898078SFam Zheng
250ba898078SFam Zheng_qemu_img_wrapper commit -U TEST_DIR/t.qcow2
251ba898078SFam Zhengqemu-img: unrecognized option '-U'
252ba898078SFam ZhengTry 'qemu-img --help' for more information
253ba898078SFam Zheng
254ba898078SFam Zheng_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M
255ba898078SFam Zhengqemu-img: unrecognized option '-U'
256ba898078SFam ZhengTry 'qemu-img --help' for more information
257ba898078SFam Zheng
258b66ff2c2SEric Blake_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
259ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': Failed to get "write" lock
260b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
261ba898078SFam Zheng
262ba898078SFam Zheng_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2
263ba898078SFam Zheng
264ba898078SFam Zheng_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
265ba898078SFam Zheng
266ba898078SFam Zheng_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
267ba898078SFam Zheng
268ba898078SFam Zheng_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2
269ba898078SFam Zheng
270ba898078SFam Zheng_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2
271ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images
272a98b1a1fSEric Blake{ 'execute': 'quit' }
273ba898078SFam Zheng
274ba898078SFam ZhengRound done
275ba898078SFam Zheng
276ba898078SFam Zheng== Creating base image ==
277ba898078SFam ZhengFormatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=33554432
278ba898078SFam Zheng
279ba898078SFam Zheng== Creating test image ==
280b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
281ba898078SFam Zheng
282ba898078SFam Zheng== Launching QEMU, opts: 'read-only=on,force-share=on' ==
283ba898078SFam Zheng
284ba898078SFam Zheng== Launching another QEMU, opts: '' ==
285ba898078SFam Zheng
286ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on' ==
287ba898078SFam Zheng
288ba898078SFam Zheng== Launching another QEMU, opts: 'read-only=on,force-share=on' ==
289ba898078SFam Zheng
290ba898078SFam Zheng== Running utility commands  ==
291ba898078SFam Zheng
292ba898078SFam Zheng_qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2
293ba898078SFam Zheng
294ba898078SFam Zheng_qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2
295ba898078SFam Zheng
296ba898078SFam Zheng_qemu_io_wrapper -c open  TEST_DIR/t.qcow2 -c read 0 512
297ba898078SFam Zheng
298ba898078SFam Zheng_qemu_io_wrapper -c open -r  TEST_DIR/t.qcow2 -c read 0 512
299ba898078SFam Zheng
300ba898078SFam Zheng_qemu_img_wrapper info TEST_DIR/t.qcow2
301ba898078SFam Zheng
302ba898078SFam Zheng_qemu_img_wrapper check TEST_DIR/t.qcow2
303ba898078SFam Zheng
304ba898078SFam Zheng_qemu_img_wrapper compare TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
305ba898078SFam Zheng
306ba898078SFam Zheng_qemu_img_wrapper map TEST_DIR/t.qcow2
307ba898078SFam Zheng
30844e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M TEST_DIR/t.qcow2
309ba898078SFam Zheng
310ba898078SFam Zheng_qemu_img_wrapper commit TEST_DIR/t.qcow2
311ba898078SFam Zheng
312ba898078SFam Zheng_qemu_img_wrapper resize TEST_DIR/t.qcow2 32M
313ba898078SFam Zheng
314b66ff2c2SEric Blake_qemu_img_wrapper rebase TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
315ba898078SFam Zheng
316ba898078SFam Zheng_qemu_img_wrapper snapshot -l TEST_DIR/t.qcow2
317ba898078SFam Zheng
318ba898078SFam Zheng_qemu_img_wrapper convert TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
319ba898078SFam Zheng
320ba898078SFam Zheng_qemu_img_wrapper dd if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
321ba898078SFam Zheng
322ba898078SFam Zheng_qemu_img_wrapper bench -c 1 TEST_DIR/t.qcow2
323ba898078SFam Zheng
324ba898078SFam Zheng_qemu_img_wrapper bench -w -c 1 TEST_DIR/t.qcow2
325ba898078SFam Zheng
326b66ff2c2SEric Blake_qemu_img_wrapper create -f qcow2 TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
327f45b638fSMax Reitzfile format: IMGFMT
328b66ff2c2SEric Blakebacking file format: IMGFMT
329f45b638fSMax Reitz
330ba898078SFam Zheng== Running utility commands -U ==
331ba898078SFam Zheng
332ba898078SFam Zheng_qemu_io_wrapper -U -c read 0 512 TEST_DIR/t.qcow2
33336b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
334ba898078SFam Zheng
335ba898078SFam Zheng_qemu_io_wrapper -U -r -c read 0 512 TEST_DIR/t.qcow2
336ba898078SFam Zheng
337ba898078SFam Zheng_qemu_io_wrapper -c open -U TEST_DIR/t.qcow2 -c read 0 512
33836b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: force-share=on can only be used with read-only images
33964ebf556SEric Blakeno file open, try 'help open'
340ba898078SFam Zheng
341ba898078SFam Zheng_qemu_io_wrapper -c open -r -U TEST_DIR/t.qcow2 -c read 0 512
342ba898078SFam Zheng
343ba898078SFam Zheng_qemu_img_wrapper info -U TEST_DIR/t.qcow2
344ba898078SFam Zheng
345ba898078SFam Zheng_qemu_img_wrapper check -U TEST_DIR/t.qcow2
346ba898078SFam Zheng
347ba898078SFam Zheng_qemu_img_wrapper compare -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2
348ba898078SFam Zheng
349ba898078SFam Zheng_qemu_img_wrapper map -U TEST_DIR/t.qcow2
350ba898078SFam Zheng
35144e808c1SMaxim Levitsky_qemu_img_wrapper amend -o size=32M -U TEST_DIR/t.qcow2
352ba898078SFam Zhengqemu-img: unrecognized option '-U'
353ba898078SFam ZhengTry 'qemu-img --help' for more information
354ba898078SFam Zheng
355ba898078SFam Zheng_qemu_img_wrapper commit -U TEST_DIR/t.qcow2
356ba898078SFam Zhengqemu-img: unrecognized option '-U'
357ba898078SFam ZhengTry 'qemu-img --help' for more information
358ba898078SFam Zheng
359ba898078SFam Zheng_qemu_img_wrapper resize -U TEST_DIR/t.qcow2 32M
360ba898078SFam Zhengqemu-img: unrecognized option '-U'
361ba898078SFam ZhengTry 'qemu-img --help' for more information
362ba898078SFam Zheng
363b66ff2c2SEric Blake_qemu_img_wrapper rebase -U TEST_DIR/t.qcow2 -b TEST_DIR/t.qcow2.base -F qcow2
364ba898078SFam Zheng
365ba898078SFam Zheng_qemu_img_wrapper snapshot -l -U TEST_DIR/t.qcow2
366ba898078SFam Zheng
367ba898078SFam Zheng_qemu_img_wrapper convert -U TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.convert
368ba898078SFam Zheng
369ba898078SFam Zheng_qemu_img_wrapper dd -U if=TEST_DIR/t.qcow2 of=TEST_DIR/t.qcow2.convert bs=512 count=1
370ba898078SFam Zheng
371ba898078SFam Zheng_qemu_img_wrapper bench -U -c 1 TEST_DIR/t.qcow2
372ba898078SFam Zheng
373ba898078SFam Zheng_qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2
374ba898078SFam Zhengqemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images
375a98b1a1fSEric Blake{ 'execute': 'quit' }
376ba898078SFam Zheng
377ba898078SFam ZhengRound done
3780e1a5827SFam Zheng
3790e1a5827SFam Zheng== Two devices with the same image (read-only=off - read-only=off) ==
3800e1a5827SFam ZhengQEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
381b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
3820e1a5827SFam Zheng
3830e1a5827SFam Zheng== Two devices with the same image (read-only=off - read-only=on) ==
3840e1a5827SFam ZhengQEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=on: Failed to get shared "write" lock
385b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
3860e1a5827SFam Zheng
3870e1a5827SFam Zheng== Two devices with the same image (read-only=off - read-only=on,force-share=on) ==
3880e1a5827SFam Zheng
3890e1a5827SFam Zheng== Two devices with the same image (read-only=on - read-only=off) ==
3900e1a5827SFam ZhengQEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
391b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
3920e1a5827SFam Zheng
3930e1a5827SFam Zheng== Two devices with the same image (read-only=on - read-only=on) ==
3940e1a5827SFam Zheng
3950e1a5827SFam Zheng== Two devices with the same image (read-only=on - read-only=on,force-share=on) ==
3960e1a5827SFam Zheng
3970e1a5827SFam Zheng== Two devices with the same image (read-only=on,force-share=on - read-only=off) ==
3980e1a5827SFam Zheng
3990e1a5827SFam Zheng== Two devices with the same image (read-only=on,force-share=on - read-only=on) ==
4000e1a5827SFam Zheng
4010e1a5827SFam Zheng== Two devices with the same image (read-only=on,force-share=on - read-only=on,force-share=on) ==
4020e1a5827SFam Zheng
403ba898078SFam Zheng== Creating TEST_DIR/t.qcow2.[abc] ==
404b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT.a', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
405b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT.b', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
406b66ff2c2SEric BlakeFormatting 'TEST_DIR/t.IMGFMT.c', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT.b backing_fmt=IMGFMT
407ba898078SFam Zheng
408ba898078SFam Zheng== Two devices sharing the same file in backing chain ==
409ba898078SFam Zheng
410ba898078SFam Zheng== Backing image also as an active device ==
411ba898078SFam ZhengQEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock
412b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
413ba898078SFam Zheng
414ba898078SFam Zheng== Backing image also as an active device (ro) ==
415ba898078SFam Zheng
416ba898078SFam Zheng== Symbolic link ==
417ba898078SFam ZhengQEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock
418b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
419de963500SFam Zheng
420de963500SFam Zheng== Active commit to intermediate layer should work when base in use ==
421a98b1a1fSEric Blake{ 'execute': 'qmp_capabilities' }
422de963500SFam Zheng{"return": {}}
423de963500SFam Zheng
424de963500SFam Zheng_qemu_img_wrapper commit -b TEST_DIR/t.qcow2.b TEST_DIR/t.qcow2.c
425a98b1a1fSEric Blake{ 'execute': 'qmp_capabilities' }
426ba898078SFam Zheng{"return": {}}
427ba898078SFam ZhengAdding drive
428*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
429*0e720781SMax Reitz       'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT' } }
4309cd97956SSergio Lopez{"return": "OKrn"}
431ba898078SFam Zheng
432ba898078SFam Zheng_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
43336b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
434b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
435fcca5dceSFam ZhengCreating overlay with qemu-img when the guest is running should be allowed
436fcca5dceSFam Zheng
437b66ff2c2SEric Blake_qemu_img_wrapper create -f qcow2 -b TEST_DIR/t.qcow2 -F qcow2 TEST_DIR/t.qcow2.overlay
438fcca5dceSFam Zheng== Closing an image should unlock it ==
439*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
440*0e720781SMax Reitz       'arguments': { 'command-line': 'drive_del d0' } }
4419cd97956SSergio Lopez{"return": ""}
442ba898078SFam Zheng
443ba898078SFam Zheng_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
444ba898078SFam ZhengAdding two and closing one
445*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
446*0e720781SMax Reitz           'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT,readonly=on' } }
4479cd97956SSergio Lopez{"return": "OKrn"}
448*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
449*0e720781SMax Reitz           'arguments': { 'command-line': 'drive_add 0 if=none,id=d1,file=TEST_DIR/t.IMGFMT,readonly=on' } }
4509cd97956SSergio Lopez{"return": "OKrn"}
451ba898078SFam Zheng
452ba898078SFam Zheng_qemu_img_wrapper info TEST_DIR/t.qcow2
453*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
454*0e720781SMax Reitz       'arguments': { 'command-line': 'drive_del d0' } }
4559cd97956SSergio Lopez{"return": ""}
456ba898078SFam Zheng
457ba898078SFam Zheng_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
45836b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
459b857431dSFam ZhengIs another process using the image [TEST_DIR/t.qcow2]?
460ba898078SFam ZhengClosing the other
461*0e720781SMax Reitz{ 'execute': 'human-monitor-command',
462*0e720781SMax Reitz       'arguments': { 'command-line': 'drive_del d1' } }
4639cd97956SSergio Lopez{"return": ""}
464ba898078SFam Zheng
465ba898078SFam Zheng_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
4664e7d73c5SMax Reitz
4674e7d73c5SMax Reitz== Detecting -U and force-share conflicts ==
4684e7d73c5SMax Reitz
4694e7d73c5SMax ReitzNo conflict:
4704e7d73c5SMax Reitzimage: null-co://
4714e7d73c5SMax Reitzfile format: null-co
472de38b500SEric Blakevirtual size: 1 GiB (1073741824 bytes)
47307cd7b65SMax Reitzdisk size: 0 B
4744e7d73c5SMax Reitz
4754e7d73c5SMax ReitzConflict:
4764e7d73c5SMax Reitzqemu-img: --force-share/-U conflicts with image options
4774e7d73c5SMax Reitz
4784e7d73c5SMax ReitzNo conflict:
4794e7d73c5SMax Reitz
4804e7d73c5SMax ReitzConflict:
48136b9986bSThomas Huthqemu-io: -U conflicts with image options
482ba898078SFam Zheng*** done
483