@@ -18,7 +18,14 @@ except ARM which is not supported.
18
18
### Overview
19
19
A Firecracker microVM snapshot can be used for loading it later in a different
20
20
Firecracker process, and the original guest workload is being simply resumed.
21
- It is not guaranteed though that the state of the network connections survives
21
+
22
+ The original guest which the snapshot is created from, should see no side
23
+ effects from this process (other than the latency introduced by the snapshot
24
+ creation process).
25
+
26
+ Both network and vsock packet loss can be expected on guests that are resumed
27
+ from snapshots in another Firecracker process.
28
+ It is also not guaranteed that the state of the network connections survives
22
29
the process.
23
30
24
31
In order to make restoring possible, Firecracker snapshots save the full state
@@ -72,7 +79,7 @@ deal with cryptographic secrets. Please see [Snapshot security and uniqueness](#
72
79
is not enabled, results in the full contents of guest memory being written to the
73
80
snapshot.
74
81
- The _ memory file_ and _ microVM state file_ are generated by Firecracker on snapshot
75
- creation, and the disk contents are flushed to their backing files.
82
+ creation. The disk contents are _ not _ explicitely flushed to their backing files.
76
83
- The API calls exposing the snapshotting functionality have clear ** Prerequisites**
77
84
that describe the requirements on when/how they should be used.
78
85
@@ -152,9 +159,12 @@ Details about the required and optional fields can be found in the
152
159
- The file indicated by ` snapshot_path ` (e.g. ` /path/to/snapshot_file ` ) contains the
153
160
devices' model state and emulation state. The one indicated by ` mem_file_path `
154
161
(e.g. ` /path/to/mem_file ` ) contains a full copy of the guest memory.
155
- - The block devices contents are flushed to their backing files. At this point, these
156
- should be backed up externally by the user. The generated snapshot files are
157
- immediately available to be used (current process releases ownership).
162
+ - The generated snapshot files are immediately available to be used (current process
163
+ releases ownership). At this point, the block devices backing files should be
164
+ backed up externally by the user.
165
+ Please note that block device contents are only guaranteed to be committed/flushed
166
+ to the host FS, but not necessarily to the underlying persistent storage
167
+ (could still live in host FS cache).
158
168
- If diff snapshots were enabled, the snapshot creation resets then the dirtied page
159
169
bitmap and marks all pages clean (from a diff snapshot point of view).
160
170
@@ -334,3 +344,20 @@ properties are preserved and guaranteed before resuming the workload.
334
344
335
345
We've started a discussion on how the Linux operating system might securely
336
346
handle being snapshotted [ here] ( https://lkml.org/lkml/2020/10/16/629 ) .
347
+
348
+ ## Known Issues
349
+
350
+ ### Vsock must be inactive during snapshot
351
+
352
+ Vsock device can break if snapshotted while having active connections.
353
+ Firecracker snapshots do not capture any inflight network or vsock (through the
354
+ linux unix domain socket backend) traffic that has left or not yet entered
355
+ Firecracker.
356
+
357
+ The above, coupled with the fact that Vsock control protocol is not resilient
358
+ to vsock packet loss leads to Vsock device breakage when doing a snapshot while
359
+ there are active Vsock connections.
360
+
361
+ #### Workaround
362
+
363
+ Close all active Vsock connections prior to snapshotting the VM.
0 commit comments