blob: 61e7241e0bf3a895d1a2ed21e0a2e0b951269260 [file] [log] [blame]
Kevin Wolf39218a72018-02-07 16:42:44 +01001=== Successful image creation (defaults) ===
2
Max Reitz8a57a4b2019-02-10 15:57:36 +01003{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
Max Reitze21b5f32018-10-22 14:53:07 +01004{"return": {}}
5{"execute": "job-dismiss", "arguments": {"id": "job0"}}
6{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +01007
Max Reitz8a57a4b2019-02-10 15:57:36 +01008{"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "node-name": "imgfile"}}
Max Reitze21b5f32018-10-22 14:53:07 +01009{"return": {}}
Max Reitz8a57a4b2019-02-10 15:57:36 +010010{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "imgfile", "size": 134217728}}}
Max Reitze21b5f32018-10-22 14:53:07 +010011{"return": {}}
12{"execute": "job-dismiss", "arguments": {"id": "job0"}}
13{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +020014
15image: TEST_IMG
Kevin Wolf39218a72018-02-07 16:42:44 +010016file format: IMGFMT
Eric Blakede38b502019-04-17 12:11:01 -050017virtual size: 128 MiB (134217728 bytes)
Kevin Wolf39218a72018-02-07 16:42:44 +010018cluster_size: 65536
19Format specific information:
20 compat: 1.1
21 lazy refcounts: false
22 refcount bits: 16
23 corrupt: false
24
25=== Successful image creation (inline blockdev-add, explicit defaults) ===
26
Max Reitz8a57a4b2019-02-10 15:57:36 +010027{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}}
Max Reitze21b5f32018-10-22 14:53:07 +010028{"return": {}}
29{"execute": "job-dismiss", "arguments": {"id": "job0"}}
30{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +010031
Max Reitz8a57a4b2019-02-10 15:57:36 +010032{"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"}}}
Max Reitze21b5f32018-10-22 14:53:07 +010033{"return": {}}
34{"execute": "job-dismiss", "arguments": {"id": "job0"}}
35{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +020036
37image: TEST_IMG
Kevin Wolf39218a72018-02-07 16:42:44 +010038file format: IMGFMT
Eric Blakede38b502019-04-17 12:11:01 -050039virtual size: 64 MiB (67108864 bytes)
Kevin Wolf39218a72018-02-07 16:42:44 +010040cluster_size: 65536
41Format specific information:
42 compat: 1.1
43 lazy refcounts: false
44 refcount bits: 16
45 corrupt: false
46
47=== Successful image creation (v3 non-default options) ===
48
Max Reitz8a57a4b2019-02-10 15:57:36 +010049{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}}
Max Reitze21b5f32018-10-22 14:53:07 +010050{"return": {}}
51{"execute": "job-dismiss", "arguments": {"id": "job0"}}
52{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +010053
Max Reitz8a57a4b2019-02-10 15:57:36 +010054{"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"}}}
Max Reitze21b5f32018-10-22 14:53:07 +010055{"return": {}}
56{"execute": "job-dismiss", "arguments": {"id": "job0"}}
57{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +020058
59image: TEST_IMG
Kevin Wolf39218a72018-02-07 16:42:44 +010060file format: IMGFMT
Eric Blakede38b502019-04-17 12:11:01 -050061virtual size: 32 MiB (33554432 bytes)
Kevin Wolf39218a72018-02-07 16:42:44 +010062cluster_size: 2097152
63Format specific information:
64 compat: 1.1
65 lazy refcounts: true
66 refcount bits: 1
67 corrupt: false
68
69=== Successful image creation (v2 non-default options) ===
70
Max Reitz8a57a4b2019-02-10 15:57:36 +010071{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
Max Reitze21b5f32018-10-22 14:53:07 +010072{"return": {}}
73{"execute": "job-dismiss", "arguments": {"id": "job0"}}
74{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +010075
Max Reitz8a57a4b2019-02-10 15:57:36 +010076{"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"}}}
Max Reitze21b5f32018-10-22 14:53:07 +010077{"return": {}}
78{"execute": "job-dismiss", "arguments": {"id": "job0"}}
79{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +020080
81image: TEST_IMG
Kevin Wolf39218a72018-02-07 16:42:44 +010082file format: IMGFMT
Eric Blakede38b502019-04-17 12:11:01 -050083virtual size: 32 MiB (33554432 bytes)
Kevin Wolf39218a72018-02-07 16:42:44 +010084cluster_size: 512
Kevin Wolf4de110f2018-05-23 18:19:00 +020085backing file: TEST_IMG.base
Kevin Wolf39218a72018-02-07 16:42:44 +010086backing file format: IMGFMT
87Format specific information:
88 compat: 0.10
89 refcount bits: 16
90
91=== Successful image creation (encrypted) ===
92
Max Reitz8a57a4b2019-02-10 15:57:36 +010093{"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}}}
Max Reitze21b5f32018-10-22 14:53:07 +010094{"return": {}}
95{"execute": "job-dismiss", "arguments": {"id": "job0"}}
96{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +010097
Kevin Wolf4de110f2018-05-23 18:19:00 +020098image: TEST_IMG
Kevin Wolf39218a72018-02-07 16:42:44 +010099file format: IMGFMT
Eric Blakede38b502019-04-17 12:11:01 -0500100virtual size: 32 MiB (33554432 bytes)
Kevin Wolf4de110f2018-05-23 18:19:00 +0200101encrypted: yes
102cluster_size: 65536
Kevin Wolf39218a72018-02-07 16:42:44 +0100103Format specific information:
104 compat: 1.1
105 lazy refcounts: false
106 refcount bits: 16
107 encrypt:
108 ivgen alg: plain64
109 hash alg: sha1
110 cipher alg: twofish-128
Kevin Wolf4de110f2018-05-23 18:19:00 +0200111 uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Kevin Wolf39218a72018-02-07 16:42:44 +0100112 format: luks
113 cipher mode: ctr
114 slots:
115 [0]:
116 active: true
Kevin Wolf4de110f2018-05-23 18:19:00 +0200117 iters: XXX
Kevin Wolf39218a72018-02-07 16:42:44 +0100118 key offset: 4096
119 stripes: 4000
120 [1]:
121 active: false
122 key offset: 69632
123 [2]:
124 active: false
125 key offset: 135168
126 [3]:
127 active: false
128 key offset: 200704
129 [4]:
130 active: false
131 key offset: 266240
132 [5]:
133 active: false
134 key offset: 331776
135 [6]:
136 active: false
137 key offset: 397312
138 [7]:
139 active: false
140 key offset: 462848
141 payload offset: 528384
Kevin Wolf4de110f2018-05-23 18:19:00 +0200142 master key iters: XXX
Kevin Wolf39218a72018-02-07 16:42:44 +0100143 corrupt: false
144
145=== Invalid BlockdevRef ===
146
Max Reitz8a57a4b2019-02-10 15:57:36 +0100147{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100148{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200149Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
Max Reitze21b5f32018-10-22 14:53:07 +0100150{"execute": "job-dismiss", "arguments": {"id": "job0"}}
151{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100152
153=== Invalid sizes ===
Max Reitz8a57a4b2019-02-10 15:57:36 +0100154{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100155{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200156Job failed: Image size must be a multiple of 512 bytes
Max Reitze21b5f32018-10-22 14:53:07 +0100157{"execute": "job-dismiss", "arguments": {"id": "job0"}}
158{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100159
Max Reitz8a57a4b2019-02-10 15:57:36 +0100160{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100161{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200162Job failed: Could not resize image: Image size cannot be negative
Max Reitze21b5f32018-10-22 14:53:07 +0100163{"execute": "job-dismiss", "arguments": {"id": "job0"}}
164{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100165
Max Reitz8a57a4b2019-02-10 15:57:36 +0100166{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100167{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200168Job failed: Could not resize image: Image size cannot be negative
Max Reitze21b5f32018-10-22 14:53:07 +0100169{"execute": "job-dismiss", "arguments": {"id": "job0"}}
170{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200171
Max Reitz8a57a4b2019-02-10 15:57:36 +0100172{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100173{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200174Job failed: Could not resize image: Failed to grow the L1 table: File too large
Max Reitze21b5f32018-10-22 14:53:07 +0100175{"execute": "job-dismiss", "arguments": {"id": "job0"}}
176{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100177
178=== Invalid version ===
Max Reitz8a57a4b2019-02-10 15:57:36 +0100179{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100180{"error": {"class": "GenericError", "desc": "Invalid parameter 'v1'"}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100181
Max Reitz8a57a4b2019-02-10 15:57:36 +0100182{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100183{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200184Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
Max Reitze21b5f32018-10-22 14:53:07 +0100185{"execute": "job-dismiss", "arguments": {"id": "job0"}}
186{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100187
Max Reitz8a57a4b2019-02-10 15:57:36 +0100188{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100189{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200190Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
Max Reitze21b5f32018-10-22 14:53:07 +0100191{"execute": "job-dismiss", "arguments": {"id": "job0"}}
192{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100193
194=== Invalid backing file options ===
Max Reitz8a57a4b2019-02-10 15:57:36 +0100195{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100196{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200197Job failed: Backing file and preallocation cannot be used at the same time
Max Reitze21b5f32018-10-22 14:53:07 +0100198{"execute": "job-dismiss", "arguments": {"id": "job0"}}
199{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100200
Max Reitz8a57a4b2019-02-10 15:57:36 +0100201{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100202{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200203Job failed: Backing format cannot be used without backing file
Max Reitze21b5f32018-10-22 14:53:07 +0100204{"execute": "job-dismiss", "arguments": {"id": "job0"}}
205{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100206
207=== Invalid cluster size ===
Max Reitz8a57a4b2019-02-10 15:57:36 +0100208{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100209{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200210Job failed: Cluster size must be a power of two between 512 and 2048k
Max Reitze21b5f32018-10-22 14:53:07 +0100211{"execute": "job-dismiss", "arguments": {"id": "job0"}}
212{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100213
Max Reitz8a57a4b2019-02-10 15:57:36 +0100214{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100215{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200216Job failed: Cluster size must be a power of two between 512 and 2048k
Max Reitze21b5f32018-10-22 14:53:07 +0100217{"execute": "job-dismiss", "arguments": {"id": "job0"}}
218{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100219
Max Reitz8a57a4b2019-02-10 15:57:36 +0100220{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100221{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200222Job failed: Cluster size must be a power of two between 512 and 2048k
Max Reitze21b5f32018-10-22 14:53:07 +0100223{"execute": "job-dismiss", "arguments": {"id": "job0"}}
224{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200225
Max Reitz8a57a4b2019-02-10 15:57:36 +0100226{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100227{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200228Job failed: Cluster size must be a power of two between 512 and 2048k
Max Reitze21b5f32018-10-22 14:53:07 +0100229{"execute": "job-dismiss", "arguments": {"id": "job0"}}
230{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200231
Max Reitz8a57a4b2019-02-10 15:57:36 +0100232{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100233{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200234Job failed: Could not resize image: Failed to grow the L1 table: File too large
Max Reitze21b5f32018-10-22 14:53:07 +0100235{"execute": "job-dismiss", "arguments": {"id": "job0"}}
236{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100237
238=== Invalid refcount width ===
Max Reitz8a57a4b2019-02-10 15:57:36 +0100239{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100240{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200241Job failed: Refcount width must be a power of two and may not exceed 64 bits
Max Reitze21b5f32018-10-22 14:53:07 +0100242{"execute": "job-dismiss", "arguments": {"id": "job0"}}
243{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100244
Max Reitz8a57a4b2019-02-10 15:57:36 +0100245{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100246{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200247Job failed: Refcount width must be a power of two and may not exceed 64 bits
Max Reitze21b5f32018-10-22 14:53:07 +0100248{"execute": "job-dismiss", "arguments": {"id": "job0"}}
249{"return": {}}
Kevin Wolf39218a72018-02-07 16:42:44 +0100250
Max Reitz8a57a4b2019-02-10 15:57:36 +0100251{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
Max Reitze21b5f32018-10-22 14:53:07 +0100252{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200253Job failed: Refcount width must be a power of two and may not exceed 64 bits
Max Reitze21b5f32018-10-22 14:53:07 +0100254{"execute": "job-dismiss", "arguments": {"id": "job0"}}
255{"return": {}}
Kevin Wolf4de110f2018-05-23 18:19:00 +0200256