1 === Successful image creation (defaults) ===
3 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
8 {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "node-name": "imgfile"}}
10 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "imgfile", "size": 134217728}}}
12 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
17 virtual size: 128 MiB (134217728 bytes)
19 Format specific information:
21 compression type: COMPRESSION_TYPE
27 === Successful image creation (inline blockdev-add, explicit defaults) ===
29 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}}
31 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
34 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 65536, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": false, "preallocation": "off", "refcount-bits": 16, "size": 67108864, "version": "v3"}}}
36 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
41 virtual size: 64 MiB (67108864 bytes)
43 Format specific information:
45 compression type: COMPRESSION_TYPE
51 === Successful image creation (v3 non-default options) ===
53 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}}
55 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
58 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 2097152, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": true, "preallocation": "metadata", "refcount-bits": 1, "size": 33554432, "version": "v3"}}}
60 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
65 virtual size: 32 MiB (33554432 bytes)
67 Format specific information:
69 compression type: COMPRESSION_TYPE
75 === Successful image creation (v2 non-default options) ===
77 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
79 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
82 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "TEST_DIR/PID-t.qcow2.base", "backing-fmt": "qcow2", "cluster-size": 512, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432, "version": "v2"}}}
84 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
89 virtual size: 32 MiB (33554432 bytes)
91 backing file: TEST_IMG.base
92 backing file format: IMGFMT
93 Format specific information:
95 compression type: COMPRESSION_TYPE
98 === Successful image creation (encrypted) ===
100 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "encrypt": {"cipher-alg": "aes-128", "cipher-mode": "cbc", "format": "luks", "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-alg": "md5", "key-secret": "keysec0"}, "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432}}}
102 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
107 virtual size: 32 MiB (33554432 bytes)
110 Format specific information:
112 compression type: COMPRESSION_TYPE
113 lazy refcounts: false
117 detached header: false
120 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
150 payload offset: 528384
151 master key iters: XXX
155 === Invalid BlockdevRef ===
157 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
159 Job failed: Cannot find device='this doesn't exist' nor node-name='this doesn't exist'
160 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
163 === Invalid sizes ===
164 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
166 Job failed: Image size must be a multiple of 512 bytes
167 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
170 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
172 Job failed: Could not resize image: Image size cannot be negative
173 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
176 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
178 Job failed: Could not resize image: Image size cannot be negative
179 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
182 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
184 Job failed: Could not resize image: offset(9223372036854775296) exceeds maximum(9223372035781033984)
185 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
188 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372035781033984}}}
190 Job failed: Could not resize image: Failed to grow the L1 table: File too large
191 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
194 === Invalid version ===
195 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
196 {"error": {"class": "GenericError", "desc": "Parameter 'version' does not accept value 'v1'"}}
198 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
200 Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
201 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
204 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
206 Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
207 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
210 === Invalid backing file options ===
211 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
213 Job failed: Backing file and preallocation can only be used at the same time if extended_l2 is on
214 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
217 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
219 Job failed: Backing format cannot be used without backing file
220 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
223 === Invalid cluster size ===
224 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
226 Job failed: Cluster size must be a power of two between 512 and 2048k
227 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
230 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
232 Job failed: Cluster size must be a power of two between 512 and 2048k
233 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
236 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
238 Job failed: Cluster size must be a power of two between 512 and 2048k
239 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
242 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
244 Job failed: Cluster size must be a power of two between 512 and 2048k
245 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
248 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
250 Job failed: Could not resize image: Failed to grow the L1 table: File too large
251 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
254 === Invalid refcount width ===
255 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
257 Job failed: Refcount width must be a power of two and may not exceed 64 bits
258 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
261 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
263 Job failed: Refcount width must be a power of two and may not exceed 64 bits
264 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
267 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
269 Job failed: Refcount width must be a power of two and may not exceed 64 bits
270 {"execute": "job-dismiss", "arguments": {"id": "job0"}}