1--- Preparing image & VM ---
2
3--- 1st Boot (Establish Baseline Image) ---
4
5
6--- Adding bitmaps Small, Medium, Large, and Transient ---
7
8{"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 32768, "name": "Small", "node": "drive0", "persistent": true}}
9{"return": {}}
10{"execute": "block-dirty-bitmap-add", "arguments": {"name": "Medium", "node": "drive0", "persistent": true}}
11{"return": {}}
12{"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 131072, "name": "Large", "node": "drive0", "persistent": true}}
13{"return": {}}
14{"execute": "block-dirty-bitmap-add", "arguments": {"name": "Transient", "node": "drive0", "persistent": false}}
15{"return": {}}
16--- Forcing flush of bitmaps to disk ---
17
18{
19  "bitmaps": {
20    "drive0": [
21      {
22        "busy": false,
23        "count": 0,
24        "granularity": 65536,
25        "name": "Transient",
26        "persistent": false,
27        "recording": true,
28        "status": "active"
29      },
30      {
31        "busy": false,
32        "count": 0,
33        "granularity": 131072,
34        "name": "Large",
35        "persistent": true,
36        "recording": true,
37        "status": "active"
38      },
39      {
40        "busy": false,
41        "count": 0,
42        "granularity": 65536,
43        "name": "Medium",
44        "persistent": true,
45        "recording": true,
46        "status": "active"
47      },
48      {
49        "busy": false,
50        "count": 0,
51        "granularity": 32768,
52        "name": "Small",
53        "persistent": true,
54        "recording": true,
55        "status": "active"
56      }
57    ]
58  }
59}
60--- 2nd Boot (Grow Image) ---
61
62{
63  "bitmaps": {
64    "drive0": [
65      {
66        "busy": false,
67        "count": 0,
68        "granularity": 32768,
69        "name": "Small",
70        "persistent": true,
71        "recording": true,
72        "status": "active"
73      },
74      {
75        "busy": false,
76        "count": 0,
77        "granularity": 65536,
78        "name": "Medium",
79        "persistent": true,
80        "recording": true,
81        "status": "active"
82      },
83      {
84        "busy": false,
85        "count": 0,
86        "granularity": 131072,
87        "name": "Large",
88        "persistent": true,
89        "recording": true,
90        "status": "active"
91      }
92    ]
93  }
94}
95--- Adding new bitmap, growing image, and adding 2nd new bitmap ---
96{"execute": "block-dirty-bitmap-add", "arguments": {"name": "New", "node": "drive0", "persistent": true}}
97{"return": {}}
98{"execute": "human-monitor-command", "arguments": {"command-line": "block_resize drive0 70G"}}
99{"return": ""}
100{"execute": "block-dirty-bitmap-add", "arguments": {"name": "Newtwo", "node": "drive0", "persistent": true}}
101{"return": {}}
102{
103  "bitmaps": {
104    "drive0": [
105      {
106        "busy": false,
107        "count": 0,
108        "granularity": 65536,
109        "name": "Newtwo",
110        "persistent": true,
111        "recording": true,
112        "status": "active"
113      },
114      {
115        "busy": false,
116        "count": 0,
117        "granularity": 65536,
118        "name": "New",
119        "persistent": true,
120        "recording": true,
121        "status": "active"
122      },
123      {
124        "busy": false,
125        "count": 0,
126        "granularity": 32768,
127        "name": "Small",
128        "persistent": true,
129        "recording": true,
130        "status": "active"
131      },
132      {
133        "busy": false,
134        "count": 0,
135        "granularity": 65536,
136        "name": "Medium",
137        "persistent": true,
138        "recording": true,
139        "status": "active"
140      },
141      {
142        "busy": false,
143        "count": 0,
144        "granularity": 131072,
145        "name": "Large",
146        "persistent": true,
147        "recording": true,
148        "status": "active"
149      }
150    ]
151  }
152}
153--- Forcing flush of bitmaps to disk ---
154
155--- 3rd Boot (Shrink Image) ---
156
157{
158  "bitmaps": {
159    "drive0": [
160      {
161        "busy": false,
162        "count": 0,
163        "granularity": 65536,
164        "name": "New",
165        "persistent": true,
166        "recording": true,
167        "status": "active"
168      },
169      {
170        "busy": false,
171        "count": 0,
172        "granularity": 65536,
173        "name": "Newtwo",
174        "persistent": true,
175        "recording": true,
176        "status": "active"
177      },
178      {
179        "busy": false,
180        "count": 0,
181        "granularity": 32768,
182        "name": "Small",
183        "persistent": true,
184        "recording": true,
185        "status": "active"
186      },
187      {
188        "busy": false,
189        "count": 0,
190        "granularity": 65536,
191        "name": "Medium",
192        "persistent": true,
193        "recording": true,
194        "status": "active"
195      },
196      {
197        "busy": false,
198        "count": 0,
199        "granularity": 131072,
200        "name": "Large",
201        "persistent": true,
202        "recording": true,
203        "status": "active"
204      }
205    ]
206  }
207}
208--- Adding "NewB" bitmap, removing "New" bitmap ---
209{"execute": "block-dirty-bitmap-add", "arguments": {"name": "NewB", "node": "drive0", "persistent": true}}
210{"return": {}}
211{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "New", "node": "drive0"}}
212{"return": {}}
213--- Truncating image ---
214
215{"execute": "human-monitor-command", "arguments": {"command-line": "block_resize drive0 50G"}}
216{"return": ""}
217--- Adding "NewC" bitmap, removing "NewTwo" bitmap ---
218{"execute": "block-dirty-bitmap-add", "arguments": {"name": "NewC", "node": "drive0", "persistent": true}}
219{"return": {}}
220{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "Newtwo", "node": "drive0"}}
221{"return": {}}
222--- Forcing flush of bitmaps to disk ---
223
224--- 4th Boot (Verification and Cleanup) ---
225
226{
227  "bitmaps": {
228    "drive0": [
229      {
230        "busy": false,
231        "count": 0,
232        "granularity": 65536,
233        "name": "NewB",
234        "persistent": true,
235        "recording": true,
236        "status": "active"
237      },
238      {
239        "busy": false,
240        "count": 0,
241        "granularity": 65536,
242        "name": "NewC",
243        "persistent": true,
244        "recording": true,
245        "status": "active"
246      },
247      {
248        "busy": false,
249        "count": 0,
250        "granularity": 32768,
251        "name": "Small",
252        "persistent": true,
253        "recording": true,
254        "status": "active"
255      },
256      {
257        "busy": false,
258        "count": 0,
259        "granularity": 65536,
260        "name": "Medium",
261        "persistent": true,
262        "recording": true,
263        "status": "active"
264      },
265      {
266        "busy": false,
267        "count": 0,
268        "granularity": 131072,
269        "name": "Large",
270        "persistent": true,
271        "recording": true,
272        "status": "active"
273      }
274    ]
275  }
276}
277--- Removing all Bitmaps ---
278
279{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "Small", "node": "drive0"}}
280{"return": {}}
281{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "Medium", "node": "drive0"}}
282{"return": {}}
283{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "Large", "node": "drive0"}}
284{"return": {}}
285{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "NewB", "node": "drive0"}}
286{"return": {}}
287{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "NewC", "node": "drive0"}}
288{"return": {}}
289{
290  "bitmaps": {
291    "drive0": []
292  }
293}
294
295--- Done ---
296