1 === Successful image creation (defaults) ===
3 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk", "size": 0}}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
8 {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk", "node-name": "imgfile"}}
10 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "file": "imgfile", "size": 5368709120}}}
12 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
17 virtual size: 5 GiB (5368709120 bytes)
19 Format specific information:
21 parent cid: XXXXXXXXXX
22 create type: monolithicSparse
25 virtual size: 5368709120
30 === Successful image creation (inline blockdev-add, explicit defaults) ===
32 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk", "size": 0}}}
34 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
37 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "ide", "driver": "vmdk", "extents": [], "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk"}, "hwversion": "4", "size": 67108864, "subformat": "monolithicSparse", "zeroed-grain": false}}}
39 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
44 virtual size: 64 MiB (67108864 bytes)
46 Format specific information:
48 parent cid: XXXXXXXXXX
49 create type: monolithicSparse
52 virtual size: 67108864
57 === Successful image creation (with non-default options) ===
59 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk", "size": 0}}}
61 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
64 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "buslogic", "driver": "vmdk", "extents": [], "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vmdk"}, "size": 33554432, "subformat": "monolithicSparse", "zeroed-grain": true}}}
66 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
71 virtual size: 32 MiB (33554432 bytes)
73 Format specific information:
75 parent cid: XXXXXXXXXX
76 create type: monolithicSparse
79 virtual size: 33554432
84 === Invalid BlockdevRef ===
86 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "file": "this doesn't exist", "size": 33554432}}}
88 Job failed: Cannot find device='this doesn't exist' nor node-name='this doesn't exist'
89 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
94 == Valid adapter types ==
96 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "ide", "driver": "vmdk", "file": "node0", "size": 33554432}}}
98 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
101 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "buslogic", "driver": "vmdk", "file": "node0", "size": 33554432}}}
103 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
106 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "lsilogic", "driver": "vmdk", "file": "node0", "size": 33554432}}}
108 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
111 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "legacyESX", "driver": "vmdk", "file": "node0", "size": 33554432}}}
113 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
116 == Invalid adapter types ==
118 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "foo", "driver": "vmdk", "file": "node0", "size": 33554432}}}
119 {"error": {"class": "GenericError", "desc": "Invalid parameter 'foo'"}}
121 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "IDE", "driver": "vmdk", "file": "node0", "size": 33554432}}}
122 {"error": {"class": "GenericError", "desc": "Invalid parameter 'IDE'"}}
124 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": "legacyesx", "driver": "vmdk", "file": "node0", "size": 33554432}}}
125 {"error": {"class": "GenericError", "desc": "Invalid parameter 'legacyesx'"}}
127 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"adapter-type": 1, "driver": "vmdk", "file": "node0", "size": 33554432}}}
128 {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'options.adapter-type', expected: string"}}
130 === Other subformats ===
132 Formatting 'TEST_DIR/PID-t.vmdk.1', fmt=vmdk size=0 compat6=off hwversion=undefined
134 Formatting 'TEST_DIR/PID-t.vmdk.2', fmt=vmdk size=0 compat6=off hwversion=undefined
136 Formatting 'TEST_DIR/PID-t.vmdk.3', fmt=vmdk size=0 compat6=off hwversion=undefined
140 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "file": "node0", "size": 33554432, "subformat": "monolithicFlat"}}}
142 Job failed: Extent [0] not specified
143 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
148 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 33554432, "subformat": "monolithicFlat"}}}
150 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
155 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1", "ext2", "ext3"], "file": "node0", "size": 512, "subformat": "monolithicFlat"}}}
157 Job failed: List of extents contains unused extents
158 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
163 = twoGbMaxExtentFlat 512 =
165 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 512, "subformat": "twoGbMaxExtentFlat"}}}
167 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
172 virtual size: 512 B (512 bytes)
173 Format specific information:
175 parent cid: XXXXXXXXXX
176 create type: twoGbMaxExtentFlat
183 = twoGbMaxExtentSparse 512 =
185 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 512, "subformat": "twoGbMaxExtentSparse"}}}
187 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
192 virtual size: 512 B (512 bytes)
194 Format specific information:
196 parent cid: XXXXXXXXXX
197 create type: twoGbMaxExtentSparse
205 = twoGbMaxExtentFlat 1073741824 =
207 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 1073741824, "subformat": "twoGbMaxExtentFlat"}}}
209 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
214 virtual size: 1 GiB (1073741824 bytes)
215 Format specific information:
217 parent cid: XXXXXXXXXX
218 create type: twoGbMaxExtentFlat
221 virtual size: 1073741824
225 = twoGbMaxExtentSparse 1073741824 =
227 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 1073741824, "subformat": "twoGbMaxExtentSparse"}}}
229 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
234 virtual size: 1 GiB (1073741824 bytes)
236 Format specific information:
238 parent cid: XXXXXXXXXX
239 create type: twoGbMaxExtentSparse
242 virtual size: 1073741824
247 = twoGbMaxExtentFlat 2147483648 =
249 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 2147483648, "subformat": "twoGbMaxExtentFlat"}}}
251 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
256 virtual size: 2 GiB (2147483648 bytes)
257 Format specific information:
259 parent cid: XXXXXXXXXX
260 create type: twoGbMaxExtentFlat
263 virtual size: 2147483648
267 = twoGbMaxExtentSparse 2147483648 =
269 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1"], "file": "node0", "size": 2147483648, "subformat": "twoGbMaxExtentSparse"}}}
271 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
276 virtual size: 2 GiB (2147483648 bytes)
278 Format specific information:
280 parent cid: XXXXXXXXXX
281 create type: twoGbMaxExtentSparse
284 virtual size: 2147483648
289 = twoGbMaxExtentFlat 5368709120 =
291 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1", "ext2", "ext3"], "file": "node0", "size": 5368709120, "subformat": "twoGbMaxExtentFlat"}}}
293 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
298 virtual size: 5 GiB (5368709120 bytes)
299 Format specific information:
301 parent cid: XXXXXXXXXX
302 create type: twoGbMaxExtentFlat
305 virtual size: 2147483648
309 virtual size: 2147483648
313 virtual size: 1073741824
317 = twoGbMaxExtentSparse 5368709120 =
319 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vmdk", "extents": ["ext1", "ext2", "ext3"], "file": "node0", "size": 5368709120, "subformat": "twoGbMaxExtentSparse"}}}
321 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
326 virtual size: 5 GiB (5368709120 bytes)
328 Format specific information:
330 parent cid: XXXXXXXXXX
331 create type: twoGbMaxExtentSparse
334 virtual size: 2147483648
339 virtual size: 2147483648
344 virtual size: 1073741824