1QA output created by 085 2Formatting 'TEST_DIR/t.IMGFMT.1', fmt=IMGFMT size=134217728 3Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=134217728 4 5=== Running QEMU === 6 7 8=== Sending capabilities === 9 10{ 'execute': 'qmp_capabilities' } 11{"return": {}} 12 13=== Create a single snapshot on virtio0 === 14 15{ 'execute': 'blockdev-snapshot-sync', 16 'arguments': { 'device': 'virtio0', 17 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 18 'format': 'IMGFMT' } } 19Formatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.1 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 20{"return": {}} 21 22=== Invalid command - missing device and nodename === 23 24{ 'execute': 'blockdev-snapshot-sync', 25 'arguments': { 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT', 26 'format': 'IMGFMT' } } 27{"error": {"class": "GenericError", "desc": "Cannot find device='' nor node-name=''"}} 28 29=== Invalid command - missing snapshot-file === 30 31{ 'execute': 'blockdev-snapshot-sync', 32 'arguments': { 'device': 'virtio0', 33 'format': 'IMGFMT' } } 34{"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is missing"}} 35 36 37=== Create several transactional group snapshots === 38 39{ 'execute': 'transaction', 'arguments': 40 {'actions': [ 41 { 'type': 'blockdev-snapshot-sync', 'data' : 42 { 'device': 'virtio0', 43 'snapshot-file': 'TEST_DIR/2-snapshot-v0.IMGFMT' } }, 44 { 'type': 'blockdev-snapshot-sync', 'data' : 45 { 'device': 'virtio1', 46 'snapshot-file': 'TEST_DIR/2-snapshot-v1.IMGFMT' } } ] 47 } } 48Formatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/1-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 49Formatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/t.qcow2.2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 50{"return": {}} 51{ 'execute': 'transaction', 'arguments': 52 {'actions': [ 53 { 'type': 'blockdev-snapshot-sync', 'data' : 54 { 'device': 'virtio0', 55 'snapshot-file': 'TEST_DIR/3-snapshot-v0.IMGFMT' } }, 56 { 'type': 'blockdev-snapshot-sync', 'data' : 57 { 'device': 'virtio1', 58 'snapshot-file': 'TEST_DIR/3-snapshot-v1.IMGFMT' } } ] 59 } } 60Formatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 61Formatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/2-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 62{"return": {}} 63{ 'execute': 'transaction', 'arguments': 64 {'actions': [ 65 { 'type': 'blockdev-snapshot-sync', 'data' : 66 { 'device': 'virtio0', 67 'snapshot-file': 'TEST_DIR/4-snapshot-v0.IMGFMT' } }, 68 { 'type': 'blockdev-snapshot-sync', 'data' : 69 { 'device': 'virtio1', 70 'snapshot-file': 'TEST_DIR/4-snapshot-v1.IMGFMT' } } ] 71 } } 72Formatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 73Formatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/3-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 74{"return": {}} 75{ 'execute': 'transaction', 'arguments': 76 {'actions': [ 77 { 'type': 'blockdev-snapshot-sync', 'data' : 78 { 'device': 'virtio0', 79 'snapshot-file': 'TEST_DIR/5-snapshot-v0.IMGFMT' } }, 80 { 'type': 'blockdev-snapshot-sync', 'data' : 81 { 'device': 'virtio1', 82 'snapshot-file': 'TEST_DIR/5-snapshot-v1.IMGFMT' } } ] 83 } } 84Formatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 85Formatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/4-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 86{"return": {}} 87{ 'execute': 'transaction', 'arguments': 88 {'actions': [ 89 { 'type': 'blockdev-snapshot-sync', 'data' : 90 { 'device': 'virtio0', 91 'snapshot-file': 'TEST_DIR/6-snapshot-v0.IMGFMT' } }, 92 { 'type': 'blockdev-snapshot-sync', 'data' : 93 { 'device': 'virtio1', 94 'snapshot-file': 'TEST_DIR/6-snapshot-v1.IMGFMT' } } ] 95 } } 96Formatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 97Formatting 'TEST_DIR/6-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/5-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 98{"return": {}} 99{ 'execute': 'transaction', 'arguments': 100 {'actions': [ 101 { 'type': 'blockdev-snapshot-sync', 'data' : 102 { 'device': 'virtio0', 103 'snapshot-file': 'TEST_DIR/7-snapshot-v0.IMGFMT' } }, 104 { 'type': 'blockdev-snapshot-sync', 'data' : 105 { 'device': 'virtio1', 106 'snapshot-file': 'TEST_DIR/7-snapshot-v1.IMGFMT' } } ] 107 } } 108Formatting 'TEST_DIR/7-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 109Formatting 'TEST_DIR/7-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/6-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 110{"return": {}} 111{ 'execute': 'transaction', 'arguments': 112 {'actions': [ 113 { 'type': 'blockdev-snapshot-sync', 'data' : 114 { 'device': 'virtio0', 115 'snapshot-file': 'TEST_DIR/8-snapshot-v0.IMGFMT' } }, 116 { 'type': 'blockdev-snapshot-sync', 'data' : 117 { 'device': 'virtio1', 118 'snapshot-file': 'TEST_DIR/8-snapshot-v1.IMGFMT' } } ] 119 } } 120Formatting 'TEST_DIR/8-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 121Formatting 'TEST_DIR/8-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/7-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 122{"return": {}} 123{ 'execute': 'transaction', 'arguments': 124 {'actions': [ 125 { 'type': 'blockdev-snapshot-sync', 'data' : 126 { 'device': 'virtio0', 127 'snapshot-file': 'TEST_DIR/9-snapshot-v0.IMGFMT' } }, 128 { 'type': 'blockdev-snapshot-sync', 'data' : 129 { 'device': 'virtio1', 130 'snapshot-file': 'TEST_DIR/9-snapshot-v1.IMGFMT' } } ] 131 } } 132Formatting 'TEST_DIR/9-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 133Formatting 'TEST_DIR/9-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/8-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 134{"return": {}} 135{ 'execute': 'transaction', 'arguments': 136 {'actions': [ 137 { 'type': 'blockdev-snapshot-sync', 'data' : 138 { 'device': 'virtio0', 139 'snapshot-file': 'TEST_DIR/10-snapshot-v0.IMGFMT' } }, 140 { 'type': 'blockdev-snapshot-sync', 'data' : 141 { 'device': 'virtio1', 142 'snapshot-file': 'TEST_DIR/10-snapshot-v1.IMGFMT' } } ] 143 } } 144Formatting 'TEST_DIR/10-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v0.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 145Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=134217728 backing_file=TEST_DIR/9-snapshot-v1.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 146{"return": {}} 147 148=== Create a couple of snapshots using blockdev-snapshot === 149 150Formatting 'TEST_DIR/11-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/10-snapshot-v0.IMGFMT backing_fmt=IMGFMT 151{ 'execute': 'blockdev-add', 'arguments': 152 { 'driver': 'IMGFMT', 'node-name': 'snap_11', 'backing': null, 153 'file': 154 { 'driver': 'file', 'filename': 'TEST_DIR/11-snapshot-v0.IMGFMT', 155 'node-name': 'file_11' } } } 156{"return": {}} 157{ 'execute': 'blockdev-snapshot', 158 'arguments': { 'node': 'virtio0', 159 'overlay':'snap_11' } } 160{"return": {}} 161Formatting 'TEST_DIR/12-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/11-snapshot-v0.IMGFMT backing_fmt=IMGFMT 162{ 'execute': 'blockdev-add', 'arguments': 163 { 'driver': 'IMGFMT', 'node-name': 'snap_12', 'backing': null, 164 'file': 165 { 'driver': 'file', 'filename': 'TEST_DIR/12-snapshot-v0.IMGFMT', 166 'node-name': 'file_12' } } } 167{"return": {}} 168{ 'execute': 'blockdev-snapshot', 169 'arguments': { 'node': 'virtio0', 170 'overlay':'snap_12' } } 171{"return": {}} 172 173=== Invalid command - cannot create a snapshot using a file BDS === 174 175{ 'execute': 'blockdev-snapshot', 176 'arguments': { 'node':'virtio0', 177 'overlay':'file_12' } 178 } 179{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 180 181=== Invalid command - snapshot node used as active layer === 182 183{ 'execute': 'blockdev-snapshot', 184 'arguments': { 'node': 'virtio0', 185 'overlay':'snap_12' } } 186{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 187{ 'execute': 'blockdev-snapshot', 188 'arguments': { 'node':'virtio0', 189 'overlay':'virtio0' } 190 } 191{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 192{ 'execute': 'blockdev-snapshot', 193 'arguments': { 'node':'virtio0', 194 'overlay':'virtio1' } 195 } 196{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 197 198=== Invalid command - snapshot node used as backing hd === 199 200{ 'execute': 'blockdev-snapshot', 201 'arguments': { 'node': 'virtio0', 202 'overlay':'snap_11' } } 203{"error": {"class": "GenericError", "desc": "The overlay is already in use"}} 204 205=== Invalid command - snapshot node has a backing image === 206 207Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 208Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT 209{ 'execute': 'blockdev-add', 'arguments': 210 { 'driver': 'IMGFMT', 'node-name': 'snap_13', 211 'file': 212 { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT', 213 'node-name': 'file_13' } } } 214{"return": {}} 215{ 'execute': 'blockdev-snapshot', 216 'arguments': { 'node': 'virtio0', 217 'overlay':'snap_13' } } 218{"error": {"class": "GenericError", "desc": "The overlay already has a backing image"}} 219 220=== Invalid command - The node does not exist === 221 222{ 'execute': 'blockdev-snapshot', 223 'arguments': { 'node': 'virtio0', 224 'overlay':'snap_14' } } 225{"error": {"class": "GenericError", "desc": "Cannot find device='snap_14' nor node-name='snap_14'"}} 226{ 'execute': 'blockdev-snapshot', 227 'arguments': { 'node':'nodevice', 228 'overlay':'snap_13' } 229 } 230{"error": {"class": "GenericError", "desc": "Cannot find device='nodevice' nor node-name='nodevice'"}} 231*** done 232