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: zlib
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: zlib
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: zlib
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: zlib
98 === Successful image creation (encrypted) ===
100 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "encrypt": {"cipher-alg": "twofish-128", "cipher-mode": "ctr", "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: zlib
113 lazy refcounts: false
118 cipher alg: twofish-128
119 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
149 payload offset: 528384
150 master key iters: XXX
154 === Invalid BlockdevRef ===
156 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
158 Job failed: Cannot find device='this doesn't exist' nor node-name='this doesn't exist'
159 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
162 === Invalid sizes ===
163 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
165 Job failed: Image size must be a multiple of 512 bytes
166 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
169 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
171 Job failed: Could not resize image: Image size cannot be negative
172 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
175 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
177 Job failed: Could not resize image: Image size cannot be negative
178 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
181 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
183 Job failed: Could not resize image: offset(9223372036854775296) exceeds maximum(9223372035781033984)
184 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
187 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372035781033984}}}
189 Job failed: Could not resize image: Failed to grow the L1 table: File too large
190 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
193 === Invalid version ===
194 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
195 {"error": {"class": "GenericError", "desc": "Invalid parameter 'v1'"}}
197 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
199 Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
200 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
203 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
205 Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
206 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
209 === Invalid backing file options ===
210 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
212 Job failed: Backing file and preallocation can only be used at the same time if extended_l2 is on
213 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
216 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
218 Job failed: Backing format cannot be used without backing file
219 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
222 === Invalid cluster size ===
223 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
225 Job failed: Cluster size must be a power of two between 512 and 2048k
226 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
229 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
231 Job failed: Cluster size must be a power of two between 512 and 2048k
232 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
235 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
237 Job failed: Cluster size must be a power of two between 512 and 2048k
238 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
241 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
243 Job failed: Cluster size must be a power of two between 512 and 2048k
244 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
247 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
249 Job failed: Could not resize image: Failed to grow the L1 table: File too large
250 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
253 === Invalid refcount width ===
254 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
256 Job failed: Refcount width must be a power of two and may not exceed 64 bits
257 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
260 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
262 Job failed: Refcount width must be a power of two and may not exceed 64 bits
263 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
266 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
268 Job failed: Refcount width must be a power of two and may not exceed 64 bits
269 {"execute": "job-dismiss", "arguments": {"id": "job0"}}