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
26 === Successful image creation (inline blockdev-add, explicit defaults) ===
28 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}}
30 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
33 {"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"}}}
35 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
40 virtual size: 64 MiB (67108864 bytes)
42 Format specific information:
44 compression type: zlib
49 === Successful image creation (v3 non-default options) ===
51 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}}
53 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
56 {"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"}}}
58 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
63 virtual size: 32 MiB (33554432 bytes)
65 Format specific information:
67 compression type: zlib
72 === Successful image creation (v2 non-default options) ===
74 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
76 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
79 {"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"}}}
81 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
86 virtual size: 32 MiB (33554432 bytes)
88 backing file: TEST_IMG.base
89 backing file format: IMGFMT
90 Format specific information:
92 compression type: zlib
95 === Successful image creation (encrypted) ===
97 {"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}}}
99 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
104 virtual size: 32 MiB (33554432 bytes)
107 Format specific information:
109 compression type: zlib
110 lazy refcounts: false
115 cipher alg: twofish-128
116 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
146 payload offset: 528384
147 master key iters: XXX
150 === Invalid BlockdevRef ===
152 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
154 Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
155 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
158 === Invalid sizes ===
159 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
161 Job failed: Image size must be a multiple of 512 bytes
162 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
165 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
167 Job failed: Could not resize image: Image size cannot be negative
168 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
171 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
173 Job failed: Could not resize image: Image size cannot be negative
174 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
177 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
179 Job failed: Could not resize image: Failed to grow the L1 table: File too large
180 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
183 === Invalid version ===
184 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
185 {"error": {"class": "GenericError", "desc": "Invalid parameter 'v1'"}}
187 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
189 Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
190 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
193 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
195 Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
196 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
199 === Invalid backing file options ===
200 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
202 Job failed: Backing file and preallocation cannot be used at the same time
203 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
206 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
208 Job failed: Backing format cannot be used without backing file
209 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
212 === Invalid cluster size ===
213 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
215 Job failed: Cluster size must be a power of two between 512 and 2048k
216 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
219 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
221 Job failed: Cluster size must be a power of two between 512 and 2048k
222 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
225 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
227 Job failed: Cluster size must be a power of two between 512 and 2048k
228 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
231 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
233 Job failed: Cluster size must be a power of two between 512 and 2048k
234 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
237 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
239 Job failed: Could not resize image: Failed to grow the L1 table: File too large
240 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
243 === Invalid refcount width ===
244 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
246 Job failed: Refcount width must be a power of two and may not exceed 64 bits
247 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
250 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
252 Job failed: Refcount width must be a power of two and may not exceed 64 bits
253 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
256 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
258 Job failed: Refcount width must be a power of two and may not exceed 64 bits
259 {"execute": "job-dismiss", "arguments": {"id": "job0"}}