1 === Successful image creation (defaults) ===
3 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}}
5 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
8 {'execute': 'blockdev-add', 'arguments': {'node_name': 'imgfile', 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}
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: 128M (134217728 bytes)
19 Format specific information:
25 === Successful image creation (inline blockdev-add, explicit defaults) ===
27 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'nocow': False, 'preallocation': 'off', 'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}}
29 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
32 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 65536, 'refcount-bits': 16, 'version': 'v3', 'preallocation': 'off', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'lazy-refcounts': False, 'driver': 'qcow2', 'size': 67108864}}}
34 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
39 virtual size: 64M (67108864 bytes)
41 Format specific information:
47 === Successful image creation (v3 non-default options) ===
49 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'nocow': True, 'preallocation': 'falloc', 'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}}
51 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
54 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 2097152, 'refcount-bits': 1, 'version': 'v3', 'preallocation': 'metadata', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'lazy-refcounts': True, 'driver': 'qcow2', 'size': 33554432}}}
56 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
61 virtual size: 32M (33554432 bytes)
63 Format specific information:
69 === Successful image creation (v2 non-default options) ===
71 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'size': 0, 'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}}}
73 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
76 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'backing-fmt': 'qcow2', 'driver': 'qcow2', 'version': 'v2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'backing-file': 'TEST_DIR/PID-t.qcow2.base', 'size': 33554432}}}
78 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
83 virtual size: 32M (33554432 bytes)
85 backing file: TEST_IMG.base
86 backing file format: IMGFMT
87 Format specific information:
91 === Successful image creation (encrypted) ===
93 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'encrypt': {'key-secret': 'keysec0', 'iter-time': 10, 'cipher-mode': 'ctr', 'ivgen-hash-alg': 'md5', 'cipher-alg': 'twofish-128', 'format': 'luks', 'ivgen-alg': 'plain64', 'hash-alg': 'sha1'}, 'driver': 'qcow2', 'file': {'driver': 'file', 'filename': 'TEST_DIR/PID-t.qcow2'}, 'size': 33554432}}}
95 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
100 virtual size: 32M (33554432 bytes)
103 Format specific information:
105 lazy refcounts: false
110 cipher alg: twofish-128
111 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
141 payload offset: 528384
142 master key iters: XXX
145 === Invalid BlockdevRef ===
147 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': "this doesn't exist", 'size': 33554432}}}
149 Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
150 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
153 === Invalid sizes ===
154 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 1234}}}
156 Job failed: Image size must be a multiple of 512 bytes
157 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
160 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 18446744073709551104L}}}
162 Job failed: Could not resize image: Image size cannot be negative
163 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
166 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775808L}}}
168 Job failed: Could not resize image: Image size cannot be negative
169 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
172 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'driver': 'qcow2', 'file': 'node0', 'size': 9223372036854775296}}}
174 Job failed: Could not resize image: Failed to grow the L1 table: File too large
175 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
178 === Invalid version ===
179 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'version': 'v1', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
180 {u'error': {u'class': u'GenericError', u'desc': u"Invalid parameter 'v1'"}}
182 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'lazy-refcounts': True, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
184 Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
185 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
188 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 8, 'version': 'v2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
190 Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
191 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
194 === Invalid backing file options ===
195 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'preallocation': 'full', 'driver': 'qcow2', 'backing-file': '/dev/null', 'file': 'node0', 'size': 67108864}}}
197 Job failed: Backing file and preallocation cannot be used at the same time
198 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
201 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'backing-fmt': 'qcow2', 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
203 Job failed: Backing format cannot be used without backing file
204 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
207 === Invalid cluster size ===
208 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 1234, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
210 Job failed: Cluster size must be a power of two between 512 and 2048k
211 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
214 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
216 Job failed: Cluster size must be a power of two between 512 and 2048k
217 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
220 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 4194304, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
222 Job failed: Cluster size must be a power of two between 512 and 2048k
223 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
226 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
228 Job failed: Cluster size must be a power of two between 512 and 2048k
229 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
232 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'cluster-size': 512, 'driver': 'qcow2', 'file': 'node0', 'size': 281474976710656}}}
234 Job failed: Could not resize image: Failed to grow the L1 table: File too large
235 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
238 === Invalid refcount width ===
239 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 128, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
241 Job failed: Refcount width must be a power of two and may not exceed 64 bits
242 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
245 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 0, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
247 Job failed: Refcount width must be a power of two and may not exceed 64 bits
248 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}
251 {'execute': 'blockdev-create', 'arguments': {'job_id': 'job0', 'options': {'refcount-bits': 7, 'driver': 'qcow2', 'file': 'node0', 'size': 67108864}}}
253 Job failed: Refcount width must be a power of two and may not exceed 64 bits
254 {'execute': 'job-dismiss', 'arguments': {'id': 'job0'}}