1 === Successful image creation (defaults) ===
3 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
8 {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "node_name": "imgfile"}}
10 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "imgfile", "size": 134217728}}}
12 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
17 virtual size: 128M (134217728 bytes)
20 [{ "start": 0, "length": 134217728, "depth": 0, "zero": true, "data": false}]
22 === Successful image creation (explicit defaults) ===
24 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
26 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
29 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "off", "size": 67108864}}}
31 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
36 virtual size: 64M (67108864 bytes)
39 [{ "start": 0, "length": 67108864, "depth": 0, "zero": true, "data": false}]
41 === Successful image creation (with non-default options) ===
43 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}}
45 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
48 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "metadata", "size": 33554432}}}
50 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
55 virtual size: 32M (33554432 bytes)
58 [{ "start": 0, "length": 3072, "depth": 0, "zero": false, "data": true, "offset": 1024},
59 { "start": 3072, "length": 33551360, "depth": 0, "zero": true, "data": true, "offset": 4096}]
61 === Invalid BlockdevRef ===
63 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "this doesn't exist", "size": 33554432}}}
65 Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
66 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
71 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 0}}}
73 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
78 virtual size: 0 (0 bytes)
83 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203584}}}
85 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
90 virtual size: 512T (562949819203584 bytes)
95 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 18446744073709551104}}}
97 Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max supported is 0x1fffff8000000)
98 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
101 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 9223372036854775808}}}
103 Job failed: Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000)
104 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
107 {"execute": "blockdev-create", "arguments": {"job_id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203585}}}
109 Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000)
110 {"execute": "job-dismiss", "arguments": {"id": "job0"}}