1Preparing disk... 2Launching VM... 3{"execute": "nbd-server-start", "arguments": {"addr": {"data": {"path": "SOCK_DIR/PID-nbd.sock"}, "type": "unix"}}} 4{"return": {}} 5 6=== Creating export of inactive node === 7 8Exports activate nodes without allow-inactive 9disk-fmt active: False 10{"execute": "block-export-add", "arguments": {"id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 11{"return": {}} 12disk-fmt active: True 13{"execute": "query-block-exports", "arguments": {}} 14{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 15{"execute": "block-export-del", "arguments": {"id": "exp0"}} 16{"return": {}} 17{"execute": "query-block-exports", "arguments": {}} 18{"return": []} 19 20Exports activate nodes with allow-inactive=false 21{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 22{"return": {}} 23disk-fmt active: False 24{"execute": "block-export-add", "arguments": {"allow-inactive": false, "id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 25{"return": {}} 26disk-fmt active: True 27{"execute": "query-block-exports", "arguments": {}} 28{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 29{"execute": "block-export-del", "arguments": {"id": "exp0"}} 30{"return": {}} 31{"execute": "query-block-exports", "arguments": {}} 32{"return": []} 33 34Export leaves nodes inactive with allow-inactive=true 35{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 36{"return": {}} 37disk-fmt active: False 38{"execute": "block-export-add", "arguments": {"allow-inactive": true, "id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 39{"return": {}} 40disk-fmt active: False 41{"execute": "query-block-exports", "arguments": {}} 42{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 43{"execute": "block-export-del", "arguments": {"id": "exp0"}} 44{"return": {}} 45{"execute": "query-block-exports", "arguments": {}} 46{"return": []} 47 48=== Inactivating node with existing export === 49 50Inactivating nodes with an export fails without allow-inactive 51{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "disk-fmt"}} 52{"return": {}} 53{"execute": "block-export-add", "arguments": {"id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 54{"return": {}} 55{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 56{"error": {"class": "GenericError", "desc": "Failed to inactivate node: Operation not permitted"}} 57disk-fmt active: True 58{"execute": "query-block-exports", "arguments": {}} 59{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 60{"execute": "block-export-del", "arguments": {"id": "exp0"}} 61{"return": {}} 62{"execute": "query-block-exports", "arguments": {}} 63{"return": []} 64 65Inactivating nodes with an export fails with allow-inactive=false 66{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "disk-fmt"}} 67{"return": {}} 68{"execute": "block-export-add", "arguments": {"allow-inactive": false, "id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 69{"return": {}} 70{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 71{"error": {"class": "GenericError", "desc": "Failed to inactivate node: Operation not permitted"}} 72disk-fmt active: True 73{"execute": "query-block-exports", "arguments": {}} 74{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 75{"execute": "block-export-del", "arguments": {"id": "exp0"}} 76{"return": {}} 77{"execute": "query-block-exports", "arguments": {}} 78{"return": []} 79 80Inactivating nodes with an export works with allow-inactive=true 81{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "disk-fmt"}} 82{"return": {}} 83{"execute": "block-export-add", "arguments": {"allow-inactive": true, "id": "exp0", "node-name": "disk-fmt", "type": "nbd", "writable": true}} 84{"return": {}} 85{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 86{"return": {}} 87disk-fmt active: False 88{"execute": "query-block-exports", "arguments": {}} 89{"return": [{"id": "exp0", "node-name": "disk-fmt", "shutting-down": false, "type": "nbd"}]} 90{"execute": "block-export-del", "arguments": {"id": "exp0"}} 91{"return": {}} 92{"execute": "query-block-exports", "arguments": {}} 93{"return": []} 94 95=== Inactive nodes with parent === 96 97Inactivating nodes with an active parent fails 98{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "disk-fmt"}} 99{"return": {}} 100{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-file"}} 101{"error": {"class": "GenericError", "desc": "Node has active parent node"}} 102disk-file active: True 103disk-fmt active: True 104 105Inactivating nodes with an inactive parent works 106{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-fmt"}} 107{"return": {}} 108{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "disk-file"}} 109{"return": {}} 110disk-file active: False 111disk-fmt active: False 112 113Creating active parent node with an inactive child fails 114{"execute": "blockdev-add", "arguments": {"driver": "raw", "file": "disk-fmt", "node-name": "disk-filter"}} 115{"error": {"class": "GenericError", "desc": "Inactive 'disk-fmt' can't be a file child of active 'disk-filter'"}} 116{"execute": "blockdev-add", "arguments": {"active": true, "driver": "raw", "file": "disk-fmt", "node-name": "disk-filter"}} 117{"error": {"class": "GenericError", "desc": "Inactive 'disk-fmt' can't be a file child of active 'disk-filter'"}} 118 119Creating inactive parent node with an inactive child works 120{"execute": "blockdev-add", "arguments": {"active": false, "driver": "raw", "file": "disk-fmt", "node-name": "disk-filter"}} 121{"return": {}} 122{"execute": "blockdev-del", "arguments": {"node-name": "disk-filter"}} 123{"return": {}} 124 125=== Resizing an inactive node === 126{"execute": "block_resize", "arguments": {"node-name": "disk-fmt", "size": 16777216}} 127{"error": {"class": "GenericError", "desc": "Permission 'resize' unavailable on inactive node"}} 128 129=== Taking a snapshot of an inactive node === 130 131Active overlay over inactive backing file automatically makes both inactive for compatibility 132{"execute": "blockdev-add", "arguments": {"backing": null, "driver": "qcow2", "file": "snap-file", "node-name": "snap-fmt"}} 133{"return": {}} 134disk-fmt active: False 135snap-fmt active: True 136{"execute": "blockdev-snapshot", "arguments": {"node": "disk-fmt", "overlay": "snap-fmt"}} 137{"return": {}} 138disk-fmt active: False 139snap-fmt active: False 140{"execute": "blockdev-del", "arguments": {"node-name": "snap-fmt"}} 141{"return": {}} 142 143Inactive overlay over inactive backing file just works 144{"execute": "blockdev-add", "arguments": {"active": false, "backing": null, "driver": "qcow2", "file": "snap-file", "node-name": "snap-fmt"}} 145{"return": {}} 146{"execute": "blockdev-snapshot", "arguments": {"node": "disk-fmt", "overlay": "snap-fmt"}} 147{"return": {}} 148 149=== Block jobs with inactive nodes === 150 151Streaming into an inactive node 152{"execute": "block-stream", "arguments": {"device": "snap-fmt"}} 153{"error": {"class": "GenericError", "desc": "Could not create node: Inactive 'snap-fmt' can't be a file child of active 'NODE_NAME'"}} 154 155Committing an inactive root node (active commit) 156{"execute": "block-commit", "arguments": {"device": "snap-fmt", "job-id": "job0"}} 157{"error": {"class": "GenericError", "desc": "Inactive 'snap-fmt' can't be a backing child of active 'NODE_NAME'"}} 158 159Committing an inactive intermediate node to inactive base 160{"execute": "blockdev-add", "arguments": {"active": false, "backing": "snap-fmt", "driver": "qcow2", "file": "snap2-file", "node-name": "snap2-fmt"}} 161{"return": {}} 162disk-fmt active: False 163snap-fmt active: False 164snap2-fmt active: False 165{"execute": "block-commit", "arguments": {"device": "snap2-fmt", "job-id": "job0", "top-node": "snap-fmt"}} 166{"error": {"class": "GenericError", "desc": "Inactive 'snap-fmt' can't be a backing child of active 'NODE_NAME'"}} 167 168Committing an inactive intermediate node to active base 169{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "disk-fmt"}} 170{"return": {}} 171{"execute": "block-commit", "arguments": {"device": "snap2-fmt", "job-id": "job0", "top-node": "snap-fmt"}} 172{"error": {"class": "GenericError", "desc": "Inactive 'snap-fmt' can't be a backing child of active 'NODE_NAME'"}} 173 174Mirror from inactive source to active target 175{"execute": "blockdev-mirror", "arguments": {"device": "snap2-fmt", "job-id": "job0", "sync": "full", "target": "target-fmt"}} 176{"error": {"class": "GenericError", "desc": "Inactive 'snap2-fmt' can't be a backing child of active 'NODE_NAME'"}} 177 178Mirror from active source to inactive target 179disk-fmt active: True 180snap-fmt active: False 181snap2-fmt active: False 182target-fmt active: True 183{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "snap2-fmt"}} 184{"return": {}} 185{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "target-fmt"}} 186{"return": {}} 187disk-fmt active: True 188snap-fmt active: True 189snap2-fmt active: True 190target-fmt active: False 191{"execute": "blockdev-mirror", "arguments": {"device": "snap2-fmt", "job-id": "job0", "sync": "full", "target": "target-fmt"}} 192{"error": {"class": "GenericError", "desc": "Permission 'write' unavailable on inactive node"}} 193 194Backup from active source to inactive target 195{"execute": "blockdev-backup", "arguments": {"device": "snap2-fmt", "job-id": "job0", "sync": "full", "target": "target-fmt"}} 196{"error": {"class": "GenericError", "desc": "Could not create node: Inactive 'target-fmt' can't be a target child of active 'NODE_NAME'"}} 197 198Backup from inactive source to active target 199{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "snap2-fmt"}} 200{"return": {}} 201{"execute": "blockdev-set-active", "arguments": {"active": true, "node-name": "target-fmt"}} 202{"return": {}} 203disk-fmt active: False 204snap-fmt active: False 205snap2-fmt active: False 206target-fmt active: True 207{"execute": "blockdev-backup", "arguments": {"device": "snap2-fmt", "job-id": "job0", "sync": "full", "target": "target-fmt"}} 208{"error": {"class": "GenericError", "desc": "Could not create node: Inactive 'snap2-fmt' can't be a file child of active 'NODE_NAME'"}} 209 210=== Accessing export on inactive node === 211{"execute": "blockdev-set-active", "arguments": {"active": false, "node-name": "target-fmt"}} 212{"return": {}} 213{"execute": "block-export-add", "arguments": {"allow-inactive": true, "id": "exp0", "node-name": "target-fmt", "type": "nbd", "writable": true}} 214{"return": {}} 215read 65536/65536 bytes at offset 0 21664 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 217 218write failed: Operation not permitted 219 220write failed: Operation not permitted 221 222write failed: Operation not permitted 223 224discard failed: Operation not permitted 225 226 227qemu-io: Failed to get allocation status: Operation not permitted 228 229 230=== Resuming VM activates all images === 231{"execute": "cont", "arguments": {}} 232{"return": {}} 233disk-fmt active: True 234snap-fmt active: True 235snap2-fmt active: True 236target-fmt active: True 237 238Shutting down... 239 240