1 QA output created by 085
2 Formatting 'TEST_DIR/t.IMGFMT.1', fmt=IMGFMT size=134217728
3 Formatting 'TEST_DIR/t.IMGFMT.2', fmt=IMGFMT size=134217728
8 === Sending capabilities ===
10 { 'execute': 'qmp_capabilities' }
13 === Create a single snapshot on virtio0 ===
15 { 'execute': 'blockdev-snapshot-sync',
16 'arguments': { 'device': 'virtio0',
17 'snapshot-file':'TEST_DIR/1-snapshot-v0.IMGFMT',
18 'format': 'IMGFMT' } }
19 Formatting '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
22 === Invalid command - missing device and nodename ===
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=''"}}
29 === Invalid command - missing snapshot-file ===
31 { 'execute': 'blockdev-snapshot-sync',
32 'arguments': { 'device': 'virtio0',
33 'format': 'IMGFMT' } }
34 {"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is missing"}}
37 === Create several transactional group snapshots ===
39 { 'execute': 'transaction', 'arguments':
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' } } ]
48 Formatting '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
49 Formatting '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
51 { 'execute': 'transaction', 'arguments':
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' } } ]
60 Formatting '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
61 Formatting '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
63 { 'execute': 'transaction', 'arguments':
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' } } ]
72 Formatting '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
73 Formatting '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
75 { 'execute': 'transaction', 'arguments':
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' } } ]
84 Formatting '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
85 Formatting '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
87 { 'execute': 'transaction', 'arguments':
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' } } ]
96 Formatting '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
97 Formatting '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
99 { 'execute': 'transaction', 'arguments':
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' } } ]
108 Formatting '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
109 Formatting '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
111 { 'execute': 'transaction', 'arguments':
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' } } ]
120 Formatting '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
121 Formatting '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
123 { 'execute': 'transaction', 'arguments':
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' } } ]
132 Formatting '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
133 Formatting '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
135 { 'execute': 'transaction', 'arguments':
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' } } ]
144 Formatting '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
145 Formatting '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
148 === Create a couple of snapshots using blockdev-snapshot ===
150 Formatting '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,
154 { 'driver': 'file', 'filename': 'TEST_DIR/11-snapshot-v0.IMGFMT',
155 'node-name': 'file_11' } } }
157 { 'execute': 'blockdev-snapshot',
158 'arguments': { 'node': 'virtio0',
159 'overlay':'snap_11' } }
161 Formatting '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,
165 { 'driver': 'file', 'filename': 'TEST_DIR/12-snapshot-v0.IMGFMT',
166 'node-name': 'file_12' } } }
168 { 'execute': 'blockdev-snapshot',
169 'arguments': { 'node': 'virtio0',
170 'overlay':'snap_12' } }
173 === Invalid command - cannot create a snapshot using a file BDS ===
175 { 'execute': 'blockdev-snapshot',
176 'arguments': { 'node':'virtio0',
177 'overlay':'file_12' }
179 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
181 === Invalid command - snapshot node used as active layer ===
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' }
191 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
192 { 'execute': 'blockdev-snapshot',
193 'arguments': { 'node':'virtio0',
194 'overlay':'virtio1' }
196 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
198 === Invalid command - snapshot node used as backing hd ===
200 { 'execute': 'blockdev-snapshot',
201 'arguments': { 'node': 'virtio0',
202 'overlay':'snap_11' } }
203 {"error": {"class": "GenericError", "desc": "The overlay is already in use"}}
205 === Invalid command - snapshot node has a backing image ===
207 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728
208 Formatting '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',
212 { 'driver': 'file', 'filename': 'TEST_DIR/t.IMGFMT',
213 'node-name': 'file_13' } } }
215 { 'execute': 'blockdev-snapshot',
216 'arguments': { 'node': 'virtio0',
217 'overlay':'snap_13' } }
218 {"error": {"class": "GenericError", "desc": "The overlay already has a backing image"}}
220 === Invalid command - creating loops ===
222 Formatting 'TEST_DIR/14-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/13-snapshot-v0.IMGFMT backing_fmt=IMGFMT
223 { 'execute': 'blockdev-add', 'arguments':
224 { 'driver': 'IMGFMT', 'node-name': 'snap_14', 'backing': null,
226 { 'driver': 'file', 'filename': 'TEST_DIR/14-snapshot-v0.IMGFMT',
227 'node-name': 'file_14' } } }
229 { 'execute': 'blockdev-snapshot',
230 'arguments': { 'node':'snap_14',
231 'overlay':'snap_14' }
233 {"error": {"class": "GenericError", "desc": "Making 'snap_14' a backing child of 'snap_14' would create a cycle"}}
234 Formatting 'TEST_DIR/15-snapshot-v0.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/14-snapshot-v0.IMGFMT backing_fmt=IMGFMT
235 { 'execute': 'blockdev-add', 'arguments':
236 { 'driver': 'IMGFMT', 'node-name': 'snap_15', 'backing': 'snap_14',
238 { 'driver': 'file', 'filename': 'TEST_DIR/15-snapshot-v0.IMGFMT',
239 'node-name': 'file_15' } } }
241 { 'execute': 'blockdev-snapshot',
242 'arguments': { 'node':'snap_15',
243 'overlay':'snap_14' }
245 {"error": {"class": "GenericError", "desc": "Making 'snap_15' a backing child of 'snap_14' would create a cycle"}}
247 === Invalid command - The node does not exist ===
249 { 'execute': 'blockdev-snapshot',
250 'arguments': { 'node': 'virtio0',
251 'overlay':'snap_16' } }
252 {"error": {"class": "GenericError", "desc": "Cannot find device='snap_16' nor node-name='snap_16'"}}
253 { 'execute': 'blockdev-snapshot',
254 'arguments': { 'node':'nodevice',
255 'overlay':'snap_15' }
257 {"error": {"class": "GenericError", "desc": "Cannot find device='nodevice' nor node-name='nodevice'"}}