You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/snapshotting.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ m.PauseVM(ctx)
40
40
m.CreateSnapshot(ctx, memPath, snapPath)
41
41
```
42
42
43
-
The snapshot can be loaded at any later time at startup of a machine via the machine's `Start()` function, using `WithSnapshot()` as an option. The VM must then be resumed before attempting to use it.
43
+
The snapshot can be loaded at any later time at creation of a machine via the machine's `NewMachine()` function, using `WithSnapshot()` as an option. Upon starting, the VM loads the snapshot and must then be resumed before attempting to use it.
44
44
45
45
```
46
46
ctx := context.Background()
@@ -49,9 +49,9 @@ cfg := sdk.Config{
49
49
...
50
50
51
51
}
52
-
m, _ := sdk.NewMachine(ctx, cfg)
52
+
m, _ := sdk.NewMachine(ctx, cfg, sdk.WithSnapshot(memPath, snapPath))
0 commit comments