1=== Successful image creation (defaults) === 2 3{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} 4{"return": {}} 5{"execute": "job-dismiss", "arguments": {"id": "job0"}} 6{"return": {}} 7 8{"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "node-name": "imgfile"}} 9{"return": {}} 10{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "imgfile", "size": 134217728}}} 11{"return": {}} 12{"execute": "job-dismiss", "arguments": {"id": "job0"}} 13{"return": {}} 14 15image: TEST_IMG 16file format: IMGFMT 17virtual size: 128 MiB (134217728 bytes) 18cluster_size: 1048576 19 20[{ "start": 0, "length": 134217728, "depth": 0, "zero": true, "data": false}] 21 22=== Successful image creation (explicit defaults) === 23 24{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} 25{"return": {}} 26{"execute": "job-dismiss", "arguments": {"id": "job0"}} 27{"return": {}} 28 29{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "off", "size": 67108864}}} 30{"return": {}} 31{"execute": "job-dismiss", "arguments": {"id": "job0"}} 32{"return": {}} 33 34image: TEST_IMG 35file format: IMGFMT 36virtual size: 64 MiB (67108864 bytes) 37cluster_size: 1048576 38 39[{ "start": 0, "length": 67108864, "depth": 0, "zero": true, "data": false}] 40 41=== Successful image creation (with non-default options) === 42 43{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi", "size": 0}}} 44{"return": {}} 45{"execute": "job-dismiss", "arguments": {"id": "job0"}} 46{"return": {}} 47 48{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.vdi"}, "preallocation": "metadata", "size": 33554432}}} 49{"return": {}} 50{"execute": "job-dismiss", "arguments": {"id": "job0"}} 51{"return": {}} 52 53image: TEST_IMG 54file format: IMGFMT 55virtual size: 32 MiB (33554432 bytes) 56cluster_size: 1048576 57 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}] 60 61=== Invalid BlockdevRef === 62 63{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "this doesn't exist", "size": 33554432}}} 64{"return": {}} 65Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist 66{"execute": "job-dismiss", "arguments": {"id": "job0"}} 67{"return": {}} 68 69=== Zero size === 70 71{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 0}}} 72{"return": {}} 73{"execute": "job-dismiss", "arguments": {"id": "job0"}} 74{"return": {}} 75 76image: TEST_IMG 77file format: IMGFMT 78virtual size: 0 B (0 bytes) 79cluster_size: 1048576 80 81=== Maximum size === 82 83{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203584}}} 84{"return": {}} 85{"execute": "job-dismiss", "arguments": {"id": "job0"}} 86{"return": {}} 87 88image: TEST_IMG 89file format: IMGFMT 90virtual size: 512 TiB (562949819203584 bytes) 91cluster_size: 1048576 92 93=== Invalid sizes === 94 95{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 18446744073709551104}}} 96{"return": {}} 97Job failed: Unsupported VDI image size (size is 0xfffffffffffffe00, max supported is 0x1fffff8000000) 98{"execute": "job-dismiss", "arguments": {"id": "job0"}} 99{"return": {}} 100 101{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 9223372036854775808}}} 102{"return": {}} 103Job failed: Unsupported VDI image size (size is 0x8000000000000000, max supported is 0x1fffff8000000) 104{"execute": "job-dismiss", "arguments": {"id": "job0"}} 105{"return": {}} 106 107{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "vdi", "file": "node0", "size": 562949819203585}}} 108{"return": {}} 109Job failed: Unsupported VDI image size (size is 0x1fffff8000001, max supported is 0x1fffff8000000) 110{"execute": "job-dismiss", "arguments": {"id": "job0"}} 111{"return": {}} 112 113