139218a77SKevin Wolf=== Successful image creation (defaults) === 239218a77SKevin Wolf 38a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}} 4e21b5f34SMax Reitz{"return": {}} 5e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 6e21b5f34SMax Reitz{"return": {}} 739218a77SKevin Wolf 88a57a4beSMax Reitz{"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "node-name": "imgfile"}} 9e21b5f34SMax Reitz{"return": {}} 108a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "imgfile", "size": 134217728}}} 11e21b5f34SMax Reitz{"return": {}} 12e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 13e21b5f34SMax Reitz{"return": {}} 144de110f8SKevin Wolf 154de110f8SKevin Wolfimage: TEST_IMG 1639218a77SKevin Wolffile format: IMGFMT 17de38b500SEric Blakevirtual size: 128 MiB (134217728 bytes) 1839218a77SKevin Wolfcluster_size: 65536 1939218a77SKevin WolfFormat specific information: 2039218a77SKevin Wolf compat: 1.1 21*e877bba3SVladimir Sementsov-Ogievskiy compression type: COMPRESSION_TYPE 2239218a77SKevin Wolf lazy refcounts: false 2339218a77SKevin Wolf refcount bits: 16 2439218a77SKevin Wolf corrupt: false 257be20252SAlberto Garcia extended l2: false 2639218a77SKevin Wolf 2739218a77SKevin Wolf=== Successful image creation (inline blockdev-add, explicit defaults) === 2839218a77SKevin Wolf 298a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}} 30e21b5f34SMax Reitz{"return": {}} 31e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 32e21b5f34SMax Reitz{"return": {}} 3339218a77SKevin Wolf 348a57a4beSMax Reitz{"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"}}} 35e21b5f34SMax Reitz{"return": {}} 36e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 37e21b5f34SMax Reitz{"return": {}} 384de110f8SKevin Wolf 394de110f8SKevin Wolfimage: TEST_IMG 4039218a77SKevin Wolffile format: IMGFMT 41de38b500SEric Blakevirtual size: 64 MiB (67108864 bytes) 4239218a77SKevin Wolfcluster_size: 65536 4339218a77SKevin WolfFormat specific information: 4439218a77SKevin Wolf compat: 1.1 45*e877bba3SVladimir Sementsov-Ogievskiy compression type: COMPRESSION_TYPE 4639218a77SKevin Wolf lazy refcounts: false 4739218a77SKevin Wolf refcount bits: 16 4839218a77SKevin Wolf corrupt: false 497be20252SAlberto Garcia extended l2: false 5039218a77SKevin Wolf 5139218a77SKevin Wolf=== Successful image creation (v3 non-default options) === 5239218a77SKevin Wolf 538a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}} 54e21b5f34SMax Reitz{"return": {}} 55e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 56e21b5f34SMax Reitz{"return": {}} 5739218a77SKevin Wolf 588a57a4beSMax Reitz{"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"}}} 59e21b5f34SMax Reitz{"return": {}} 60e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 61e21b5f34SMax Reitz{"return": {}} 624de110f8SKevin Wolf 634de110f8SKevin Wolfimage: TEST_IMG 6439218a77SKevin Wolffile format: IMGFMT 65de38b500SEric Blakevirtual size: 32 MiB (33554432 bytes) 6639218a77SKevin Wolfcluster_size: 2097152 6739218a77SKevin WolfFormat specific information: 6839218a77SKevin Wolf compat: 1.1 69*e877bba3SVladimir Sementsov-Ogievskiy compression type: COMPRESSION_TYPE 7039218a77SKevin Wolf lazy refcounts: true 7139218a77SKevin Wolf refcount bits: 1 7239218a77SKevin Wolf corrupt: false 737be20252SAlberto Garcia extended l2: false 7439218a77SKevin Wolf 7539218a77SKevin Wolf=== Successful image creation (v2 non-default options) === 7639218a77SKevin Wolf 778a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}} 78e21b5f34SMax Reitz{"return": {}} 79e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 80e21b5f34SMax Reitz{"return": {}} 8139218a77SKevin Wolf 828a57a4beSMax Reitz{"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"}}} 83e21b5f34SMax Reitz{"return": {}} 84e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 85e21b5f34SMax Reitz{"return": {}} 864de110f8SKevin Wolf 874de110f8SKevin Wolfimage: TEST_IMG 8839218a77SKevin Wolffile format: IMGFMT 89de38b500SEric Blakevirtual size: 32 MiB (33554432 bytes) 9039218a77SKevin Wolfcluster_size: 512 914de110f8SKevin Wolfbacking file: TEST_IMG.base 9239218a77SKevin Wolfbacking file format: IMGFMT 9339218a77SKevin WolfFormat specific information: 9439218a77SKevin Wolf compat: 0.10 95*e877bba3SVladimir Sementsov-Ogievskiy compression type: COMPRESSION_TYPE 9639218a77SKevin Wolf refcount bits: 16 9739218a77SKevin Wolf 9839218a77SKevin Wolf=== Successful image creation (encrypted) === 9939218a77SKevin Wolf 100cb5a24d7SHanna Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "encrypt": {"cipher-alg": "aes-128", "cipher-mode": "cbc", "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}}} 101e21b5f34SMax Reitz{"return": {}} 102e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 103e21b5f34SMax Reitz{"return": {}} 10439218a77SKevin Wolf 1054de110f8SKevin Wolfimage: TEST_IMG 10639218a77SKevin Wolffile format: IMGFMT 107de38b500SEric Blakevirtual size: 32 MiB (33554432 bytes) 1084de110f8SKevin Wolfencrypted: yes 1094de110f8SKevin Wolfcluster_size: 65536 11039218a77SKevin WolfFormat specific information: 11139218a77SKevin Wolf compat: 1.1 112*e877bba3SVladimir Sementsov-Ogievskiy compression type: COMPRESSION_TYPE 11339218a77SKevin Wolf lazy refcounts: false 11439218a77SKevin Wolf refcount bits: 16 11539218a77SKevin Wolf encrypt: 11639218a77SKevin Wolf ivgen alg: plain64 11739218a77SKevin Wolf hash alg: sha1 118cb5a24d7SHanna Reitz cipher alg: aes-128 1194de110f8SKevin Wolf uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 12039218a77SKevin Wolf format: luks 121cb5a24d7SHanna Reitz cipher mode: cbc 12239218a77SKevin Wolf slots: 12339218a77SKevin Wolf [0]: 12439218a77SKevin Wolf active: true 1254de110f8SKevin Wolf iters: XXX 12639218a77SKevin Wolf key offset: 4096 12739218a77SKevin Wolf stripes: 4000 12839218a77SKevin Wolf [1]: 12939218a77SKevin Wolf active: false 13039218a77SKevin Wolf key offset: 69632 13139218a77SKevin Wolf [2]: 13239218a77SKevin Wolf active: false 13339218a77SKevin Wolf key offset: 135168 13439218a77SKevin Wolf [3]: 13539218a77SKevin Wolf active: false 13639218a77SKevin Wolf key offset: 200704 13739218a77SKevin Wolf [4]: 13839218a77SKevin Wolf active: false 13939218a77SKevin Wolf key offset: 266240 14039218a77SKevin Wolf [5]: 14139218a77SKevin Wolf active: false 14239218a77SKevin Wolf key offset: 331776 14339218a77SKevin Wolf [6]: 14439218a77SKevin Wolf active: false 14539218a77SKevin Wolf key offset: 397312 14639218a77SKevin Wolf [7]: 14739218a77SKevin Wolf active: false 14839218a77SKevin Wolf key offset: 462848 14939218a77SKevin Wolf payload offset: 528384 1504de110f8SKevin Wolf master key iters: XXX 15139218a77SKevin Wolf corrupt: false 1527be20252SAlberto Garcia extended l2: false 15339218a77SKevin Wolf 15439218a77SKevin Wolf=== Invalid BlockdevRef === 15539218a77SKevin Wolf 1568a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}} 157e21b5f34SMax Reitz{"return": {}} 158785ec4b1SConnor KuehlJob failed: Cannot find device='this doesn't exist' nor node-name='this doesn't exist' 159e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 160e21b5f34SMax Reitz{"return": {}} 16139218a77SKevin Wolf 16239218a77SKevin Wolf=== Invalid sizes === 1638a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}} 164e21b5f34SMax Reitz{"return": {}} 1654de110f8SKevin WolfJob failed: Image size must be a multiple of 512 bytes 166e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 167e21b5f34SMax Reitz{"return": {}} 16839218a77SKevin Wolf 1698a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}} 170e21b5f34SMax Reitz{"return": {}} 1714de110f8SKevin WolfJob failed: Could not resize image: Image size cannot be negative 172e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 173e21b5f34SMax Reitz{"return": {}} 17439218a77SKevin Wolf 1758a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}} 176e21b5f34SMax Reitz{"return": {}} 1774de110f8SKevin WolfJob failed: Could not resize image: Image size cannot be negative 178e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 179e21b5f34SMax Reitz{"return": {}} 1804de110f8SKevin Wolf 1818a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}} 182e21b5f34SMax Reitz{"return": {}} 18369b55e03SVladimir Sementsov-OgievskiyJob failed: Could not resize image: offset(9223372036854775296) exceeds maximum(9223372035781033984) 1848b117001SVladimir Sementsov-Ogievskiy{"execute": "job-dismiss", "arguments": {"id": "job0"}} 1858b117001SVladimir Sementsov-Ogievskiy{"return": {}} 1868b117001SVladimir Sementsov-Ogievskiy 1878b117001SVladimir Sementsov-Ogievskiy{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372035781033984}}} 1888b117001SVladimir Sementsov-Ogievskiy{"return": {}} 1894de110f8SKevin WolfJob failed: Could not resize image: Failed to grow the L1 table: File too large 190e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 191e21b5f34SMax Reitz{"return": {}} 19239218a77SKevin Wolf 19339218a77SKevin Wolf=== Invalid version === 1948a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}} 195ea29331bSMarkus Armbruster{"error": {"class": "GenericError", "desc": "Parameter 'version' does not accept value 'v1'"}} 19639218a77SKevin Wolf 1978a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}} 198e21b5f34SMax Reitz{"return": {}} 1994de110f8SKevin WolfJob failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater) 200e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 201e21b5f34SMax Reitz{"return": {}} 20239218a77SKevin Wolf 2038a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}} 204e21b5f34SMax Reitz{"return": {}} 2054de110f8SKevin WolfJob failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater) 206e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 207e21b5f34SMax Reitz{"return": {}} 20839218a77SKevin Wolf 20939218a77SKevin Wolf=== Invalid backing file options === 2108a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}} 211e21b5f34SMax Reitz{"return": {}} 2122118771dSAlberto GarciaJob failed: Backing file and preallocation can only be used at the same time if extended_l2 is on 213e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 214e21b5f34SMax Reitz{"return": {}} 21539218a77SKevin Wolf 2168a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}} 217e21b5f34SMax Reitz{"return": {}} 2184de110f8SKevin WolfJob failed: Backing format cannot be used without backing file 219e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 220e21b5f34SMax Reitz{"return": {}} 22139218a77SKevin Wolf 22239218a77SKevin Wolf=== Invalid cluster size === 2238a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}} 224e21b5f34SMax Reitz{"return": {}} 2254de110f8SKevin WolfJob failed: Cluster size must be a power of two between 512 and 2048k 226e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 227e21b5f34SMax Reitz{"return": {}} 22839218a77SKevin Wolf 2298a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}} 230e21b5f34SMax Reitz{"return": {}} 2314de110f8SKevin WolfJob failed: Cluster size must be a power of two between 512 and 2048k 232e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 233e21b5f34SMax Reitz{"return": {}} 23439218a77SKevin Wolf 2358a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}} 236e21b5f34SMax Reitz{"return": {}} 2374de110f8SKevin WolfJob failed: Cluster size must be a power of two between 512 and 2048k 238e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 239e21b5f34SMax Reitz{"return": {}} 2404de110f8SKevin Wolf 2418a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}} 242e21b5f34SMax Reitz{"return": {}} 2434de110f8SKevin WolfJob failed: Cluster size must be a power of two between 512 and 2048k 244e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 245e21b5f34SMax Reitz{"return": {}} 2464de110f8SKevin Wolf 2478a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}} 248e21b5f34SMax Reitz{"return": {}} 2494de110f8SKevin WolfJob failed: Could not resize image: Failed to grow the L1 table: File too large 250e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 251e21b5f34SMax Reitz{"return": {}} 25239218a77SKevin Wolf 25339218a77SKevin Wolf=== Invalid refcount width === 2548a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}} 255e21b5f34SMax Reitz{"return": {}} 2564de110f8SKevin WolfJob failed: Refcount width must be a power of two and may not exceed 64 bits 257e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 258e21b5f34SMax Reitz{"return": {}} 25939218a77SKevin Wolf 2608a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}} 261e21b5f34SMax Reitz{"return": {}} 2624de110f8SKevin WolfJob failed: Refcount width must be a power of two and may not exceed 64 bits 263e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 264e21b5f34SMax Reitz{"return": {}} 26539218a77SKevin Wolf 2668a57a4beSMax Reitz{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}} 267e21b5f34SMax Reitz{"return": {}} 2684de110f8SKevin WolfJob failed: Refcount width must be a power of two and may not exceed 64 bits 269e21b5f34SMax Reitz{"execute": "job-dismiss", "arguments": {"id": "job0"}} 270e21b5f34SMax Reitz{"return": {}} 2714de110f8SKevin Wolf 272